procedure TForm1.Timer1Timer(Sender: TObject); begin if Form1.Handle <> GetActiveWindow then Application.Minimize; end;