var i:integer; child :Tform; fchild :Tform; begin for i:=0 to Screen.FormCount -1do if Screen.Forms[i].ClassType=Formclass then begin child:=Screen.Forms[i]; if child.WindowState =wsMinimized then showWindow(child.handle,SW_SHOWNORMAL) else showWindow(child.handle,SW_SHOWNA); if (not child.Visible ) then child.Visible :=True; child.BringToFront ; child.SetFocus ; Tform(myform):=child; exit end; lockWindowUpdate(handle); fchild := Tform(Formclass.Newinstance); Tform(myform) := fchild; fchild.Create(AOwner); LockWindowUpdate(0);