Ver Mensaje Individual
  #4  
Antiguo 02-03-2009
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - Espańa
Posts: 18.331
Reputación: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
Creo que para esto se pueden usar las propiedades MDIChildCount y MDIChildren de TForm.

Por ejemplo para un form2 se puede preguntar si ya está entre los que están creados/abiertos.

Código Delphi [-]
var
  i:Integer;
begin

  // Revisar los formularios...
  for i := 0 to (Self.MDIChildCount - 1) do begin
    if (Self.MDIChildren[i] = form2) then begin
      // Nada
      MessageDlg('Ya está abierto...', mtInformation, [mbOK], 0);
      Exit;
    end;
  end;

  // Si llega a quí es que hay que crearlo.
  form2 := TForm2.Create(Self);

Puedes colocarlo dentro de un procedimiento para automatizarlo...
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita