I had found this page before, but oddly I never thought to check
showCmd. Thank you.
One last thing (that I thought I'd figured out already, but haven't) is
how to determine which screen a window is on *when it is maximized*
using the Win32 API. It is easy to figure it out when it is not
maximized, the placement coordinates give that away, but when a window
is maximized, the Win32 API seems to tell me that the window origin is
-1, -1 no matter which screen the window in question is maximized on.
To clarify, I'm not worried about the form for the program I'm writing
now, its every other window on the user's desktop that I'm interested in
moving around, which is why I have to use user32.dll and P/Invoke to
move them around.
Thanks.
Stanimir Stoyanov wrote:
"jeremiah johnson" wrote:
>I need to know the windowstate in order to move it properly.
Hello Jeremiah,
You can use the USER API GetWindowPlacement to obtain the current status of
a given window -- the showCmd field of the returned WINDOWPLACEMENT structure
should be equal to SW_MAXIMIZE (3) if the window is maximized.
You can find the P/Invoke signature and structure information at
http://www.pinvoke.net/default.aspx/...indowPlacement
--
jeremiah();