Ver Mensaje Individual
  #5  
Antiguo 08-02-2012
LoPiTaL LoPiTaL is offline
Miembro
 
Registrado: abr 2009
Posts: 168
Reputación: 16
LoPiTaL Va por buen camino
Sería conveniente que nos mostrases cómo lo haces.

Así te debería funcionar:

Código Delphi [-]
TForm1.Button1Click(Sender: TObject);
begin
  Form2.ShowModal;
end;

Si usas directamente Form2, no hace falta que lo destruyas (cuando cierras, el formulario sólo se oculta, no se destruye). Si quieres crearlo y destruirlo, entonces NO deberías usar la variable Form2, sino directamente hacerlo con la clase:

Código Delphi [-]
TForm1.Button1Click(Sender: TObject);
begin
  with TForm2.Create(nil) do begin
    try
      ShowModal;
    finally
      Free;
    end;
  end;
end;

Un saludo,
LoPiTaL
Responder Con Cita