Check external program window state, mimic that state
<p>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.</p>

<p>Is this even possible?  If so, what code would I use to achieve such a feat?</p>
