Something
public text v1 · immutableProcedure TCSettingsFunctions.FocusLost;
Var
ActiveHandle : THandle;
Begin
ActiveHandle := GetForegroundWindow();
If ActiveHandle <> Form1.Handle Then
Begin
If HideOnMinimize = 1 Then
Form1.Hide;
If AddToSysTray = 1 Then
form1.Minimize;
If (HideOnMinimize = 0) And (AddToSysTray = 0) Then
Application.Minimize;
Form1.tmFocus.Enabled := False;
End;
End;