DesktopWindow.Activated
From Xojo Documentation
Event
The window has been activated.
Notes
In an app with multiple windows, the Activated event fires each time the window becomes the frontmost. This includes when it opens. When the window first opens, the Opening event fires prior to the Activated event. Subsequent activations fire the Activated event but not the Opening event.