Class TForm1 (unit AnimWindowU)

Inherits from

TForm

Constructors



Functions

procedure FormCreate(Sender: TObject);


procedure AppOnMessage(var Msg: TMsg; var Handled: Boolean);

When the minimized application is restored, the application object simply sets the Visible property of its forms to TRUE; the forms do not actually receive the Restore message.

procedure AppRestore(Sender: TObject);

Public declarations

The Application.


procedure WMSysCommand(var Msg: TWMSysCommand);

...send the Minimize message directly to the form.

Properties

Events

Variables


Constructors


Functions


procedure FormCreate(Sender: TObject);


procedure AppOnMessage(var Msg: TMsg; var Handled: Boolean);

When the minimized application is restored, the application object simply sets the Visible property of its forms to TRUE; the forms do not actually receive the Restore message. Therefore, when the application object receives the Restore message, we must specifically send it to the main form.


procedure AppRestore(Sender: TObject);

Public declarations

The Application.OnRestore event fires after the application has been restored. This is fine for our purposes, but the application does not send the Restore message to the form. Our main form will reappear, but it will be minimized in one of the lower corners behind the task bar. Thus, we must provide a handler for the OnRestore event so the Restore message can be sent to the form.


procedure WMSysCommand(var Msg: TWMSysCommand);

...send the Minimize message directly to the form.


Properties


Events


Variables