Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Varios (https://www.clubdelphi.com/foros/forumdisplay.php?f=11)
-   -   Detectar boton Minimizar Formulario (https://www.clubdelphi.com/foros/showthread.php?t=54129)

Gabriel 10-03-2008 12:36:38

Detectar boton Minimizar Formulario
 
Hola Foro

Tengo una aplicación, que practicamente tiene bastantes pantallas modales, y pueden llegar a haber 3 profundidades de pantalla modal.

Quisiera poder detectar, si el cliente presiona el boton minimizar del formulario, para, detectarlo y minimizar la aplicación.

Ejemplo
if pulsan minimizar From Then Application.minimized;

Gracias

gluglu 10-03-2008 13:26:13

Código Delphi [-]
private
  procedure WMSysCommand(var Msg: TWMSysCommand); message WM_SYSCOMMAND;
  ...
 
procedure TForm.WMSysCommand(var Msg: TWMSysCommand);
begin
  if (Msg.CmdType = SC_MAXIMIZE) then
    ...
  else
  if (Msg.CmdType = SC_MINIMIZE) then
    ...
  else
  if (Msg.CmdType = SC_RESTORE) then
    ...
  else DefaultHandler(Msg);
end;

Saludos ;)

Gabriel 10-03-2008 17:59:19

Perfecto
 
Muchas Gracias

Gabriel


La franja horaria es GMT +2. Ahora son las 00:17:37.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi