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?
source
share