MDI程序

var
currentcount:integer;
ishaveinstance:boolean;
begin
ishaveinstance:=false;
for currentcount:=0 to MDIChildcount-1 do
begin
if MDIChildren[currentcount].ClassName='Tcardfrm' then
begin
ishaveinstance:=true;
MDIChildren[currentcount].WindowState:=wsmaximized;
end;
end;
if not ishaveinstance then Tcardfrm.create(self);
begin
icnewuserfrm := Ticnewuserfrm.Create(Application);
icNewUserfrm.ShowModal;
icnewuserfrm.Free;
end;
end;
end;

 

你可能感兴趣的:(DI)