(1)关闭子窗体是在子窗体的onclose事件中加action:=cafree;
(2)使子窗体不重复出现,是在打开子窗体时判断有没有打开子窗体,下面是我程序中一段:
if application.FindComponent('NewFrm')=nil then
begin
NewFrm:=TNewFrm.Create(Application);
NewFrm.Show;
end
else
begin
ShowWindow(NewFrm.Handle,SW_SHOWMAXIMIZED);
NewFrm.BringToFront;
NewFrm.SetFocus;
end;