if not Assigned(frmChild1) then
frmChild1:=TfrmChild1.Create(nil);
// if Assigned(CurrOpenForm) and (CurrOpenForm <> frmChild1) then
// FreeAndNil(CurrOpenForm);
try
frmChild1.ManualDock(Sheet1);
frmChild1.Show;
//CurrOpenForm :=frmChild1;
except
frmChild1.Close;
Exception.Create('打开窗体时发生意外错误!');
end;
注释的几行作用:打开新的子窗体时,关闭原来的子窗体