Thank you Avra for your great explanation on the discovery working only with ONE form, but if more than one form, then it fires when back from the other forms (sound like what Mike was saying).
I am not sure I quite understand what you were saying here. This code snippet will work with 1 or 101 forms, it doesn't matter:
procedure TForm1.FormCreate(Sender: TObject);
begin
Application.AddOnActivateHandler(@MyAppOnActivateEvent);
end;If you made event properly as described in my second answer, and register it with Application.AddOnActivateHandler, then it will get fired when ever you application gets active, no matter what number of forms you have. Wasn't that what you were looking for?