ESTE ES EL TRUCO ORIGINAL DE TRUCOMANÍA:
//////////////////////////////////////////////////////////////
Ejecutar algo antes de que tu aplicación sea mini-
mizada:
Podemos hacerlo capturando el mensaje WM_SYSCOMMAND
-Primero, capturamos el mensaje, añadiendo esta linea en el private de la declaracion de la form:
type
TForm1 = class(TForm)
private
{Esta linea/This Line}
procedure WMSysCommand(var Msg: TWMSysCommand); message WM_SYSCOMMAND;
end;
-Y en el implementation, ponemos la procedure:
procedure TForm1.WMSysCommand(var Msg: TWMSysCommand);
begin
if (Msg.CmdType = SC_MINIMIZE) or
(Msg.CmdType = SC_MAXIMIZE) then
MessageBeep(0);
DefaultHandler(Msg);
end;
__________________
:)
|