Check the status of the windows of the external program, simulate this state

Is there a way to check the state of the window (is it minimized, focused or closed) and simulate this state? For example, if my external program is minimized, I would like mine to be minimized along with it. If it is closed, I want my program to close too. The only problem I see is a focused state; but essentially, I would like the window to appear as being in the upper window, while my external program is focused.

Is it possible? If so, what code would I use to achieve such success?

+3
source share
1 answer

"user32.dll" DLLImport - . . .

+4

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


All Articles