MinimizeExample (Delphi)
Description
The following code minimizes an application when it is deactivated. Note that AppDeactivate should be declared a method of TForm1. Click anywhere outside of the form to deactivate it.
Code
procedure TForm1.FormCreate(Sender: TObject);
begin
Application.OnDeactivate := AppDeactivate;
end;
procedure TForm1.AppDeactivate(Sender: TObject);
begin
Application.Minimize;
end;
Uses
- Vcl.Forms.TApplication.Minimize ( fr | de | ja )
- Vcl.Forms.TApplication.OnDeactivate ( fr | de | ja )