Is there a way to check the window state (whether it’s minimized, focused, or closed) and mimic that state? For instance, if my external program is minimized, I’d like for mine to be minimized along with it. If it’s closed, then I would like my program to close as well. The only problem I can see is a focused state; but essentially, I would like the window to act as a stay on top window while my external program is focused.
Is this even possible? If so, what code would I use to achieve such a feat?
Calling “user32.dll” functions via DLLImport is the way to go.
This post on Determining the size & position of an external program window Might be a good starter. Gives few good hints and links to useful posts on the subject.