/*
OnDeactivate, Minimize example
The following code minimizes an application when it’s deactivated. Note that AppDeactivate should be declared a method of TForm1.
*/ 
void __fastcall TForm1::AppDeactivate(TObject *Sender)
{
  Application->Minimize();
}
void __fastcall TForm1::FormCreate(TObject *Sender)
{
  Application->OnDeactivate = AppDeactivate;
} 
