Ver Mensaje Individual
  #5  
Antiguo 18-09-2007
Avatar de seoane
[seoane] seoane is offline
Miembro Premium
 
Registrado: feb 2004
Ubicación: A Coruña, España
Posts: 3.717
Reputación: 24
seoane Va por buen camino
Una pregunta: ¿Hay alguna propiedad que nos permita diferenciar los formularios? El nombre, la clase, etc ...

Si es así puedes usar un bucle como este:
Código Delphi [-]
function Existe(Nombre: String): Boolean;
var
  i: integer;
begin
  for i:= 0 to Screen.FormCount - 1 Do
    if Screen.Forms[i].Name = Nombre then
    begin
      Result:= TRUE;
      Exit;
    end;
  Result:= FALSE;
end;
Y cuando crees o llames al formulario, podrías comprobar si existe. Yo no lo haría dentro del create del formulario.
Código Delphi [-]
if not Existe('Form1') then
begin
  // Aqui lo creas
end;
Responder Con Cita