Ver Mensaje Individual
  #5  
Antiguo 08-04-2008
Avatar de enecumene
[enecumene] enecumene is offline
Miembro de Oro
 
Registrado: may 2006
Ubicación: Santo Domingo, Rep. Dom.
Posts: 3.040
Reputación: 22
enecumene Va por buen camino
Hola, esta es una función que utilizo, es similar a lo que buscas, pero alguna utilidad le encontraras:

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 para usarlo de esta manera:

Código Delphi [-]
procedure Tincio.BitBtn1Click(Sender: TObject);
begin
if not Existe('FPedido') then
begin
FPedido:=TFPedido.Create(self);
FPedido.Show;
end else 
   ShowMessage('ventana hija ya esta abierta!');
end;

espero te sirva,

Saludos.
__________________

Mi BLOG - ¡Joder, leanse la guia de estilo!
Las Palabras son enanas, los ejemplos gigantes.
Responder Con Cita