et avec

procedure TForm1.FormDeactivate(Sender: TObject);
begin
Form1.SetFocus;
end;