Esta es la forma como creo el formulario:
class procedure Tf_sName.MostrarVentana(ATag : Integer);
var
i : Integer;
f : TForm;
begin
LockWindowUpdate(Application.MainForm.Handle);
try
for i := Screen.FormCount - 1 downto 0 do begin
f := Screen.Forms[i];
if(f is Self) then begin
if(f.WindowState = wsMinimized) then
f.WindowState := wsNormal;
f.BringToFront;
Exit;
end;
end;
f := Create(Application);
f.Tag := ATag;
f.Show;
finally
LockWindowUpdate(0);
end;
end;
|