PDA

View Full Version : Detect which window is currently on top or just made the focus?



zuilin
November 6th, 2020, 23:13
Is there any way to determine which window (of all windows) is currently on the top of the interface stack of windows?

How about determining which window was just made focus?

Thanks.

Moon Wizard
November 6th, 2020, 23:35
Windows do not have focus, only controls. There is no way to determine what control has the focus; though controls do get onGainFocus/onLoseFocus events if they register a function to receive them.

There is no API to get the topmost window.

Regards,
JPG