Function OpenMDIForm(FormName:String):Boolean;
var
i:integer;
ShowF:boolean;
begin
ShowF:=False;
if MainForm.MDIChildCount>0 then
begin
for i:=0 to MainForm.MDIChildCount-1do
if MainForm.MDIChildren.Name=FormName then
begin
MainForm.MDIChildren.Show;
ShowF:=True;
break;
end
else
ShowF:=False;
end else
ShowF:=False;
Result:=ShowF;
end;