Order and save right now!
20% off with the dicscount code for Ultimate Pack and any another product for Delphi from Greatis Programming!
This example shows, how to close application, which is losing focus and becoming deactivated. Use onDeactivate event of TApplication class.
procedure TForm1.CloseApp(Sender: TObject); begin Close; end; procedure TForm1.FormCreate(Sender: TObject); begin Application.OnDeactivate:=CloseApp; end;
More for developers