How to activate an external application window

I used FindWindow to get the window handle of an external application. How can I use this handle to activate an external application window if it is minimized or behind other applications on the Windows desktop?

+3
source share
2 answers

To prevent focus theft (or at least make accidental focus theft more difficult), Windows adds some obstacles to one process, bringing another process window up.

Check the MSDN for SetForegroundWindow (especially in the Notes section) and AllowSetForegroundWindow .

, , , .

+3

FindWindow(), ShowWindow().

0

Source: https://habr.com/ru/post/1758105/


All Articles