procedure TfrmMain.showform(FormClass: TFormClass);
var
i: integer;
begin
for i := 0 to self.MDIChildCount - 1 do
if (MDIChildren[i] is FormClass) then
begin
self.MDIChildren[i].BringToFront;
// sendmessage(MDIChildren[i].handle,wm_syscommand,SC_RESTORE,0);
MDIChildren[i].SetFocus;
Exit;
end;
FormClass.Create(self);
end;调用时:
showform(Tform1);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货