with (sender as Panel) do
begin
for i:=0 to ControlCount -1 do
begin
if Controls is tform then//判断PANEL中是否是TFORM
showmessage((Controls as tform).caption);
if Controls is tedit then//是否是其它的控件
(Controls as tedit).Clear;
end;
end;
procedure TForm1.IsFormHave;
begin
with FormPanel do
begin
if Controls[0] is TChildForm then
// Controls[0].close;
Controls[0].Free;
Controls[0].close;
end;
end;