Use GetWindowPlacement
and SetWindowPlacement
functions.
From the legendary blog "The Old New Thing".
If you have a minimized window and want to know where it will go when you restore it, the GetWindowPlacement function will tell you. In particular, the rcNormalPosition tells you where the window would go if it were restored (as opposed to minimized or maximized).
The GetWindowPlacement and SetWindowPlacement functions are typically used by programs that wish to save/restore window positioning information across runs.
Edit:
I just find this question has been asked before, and looks like these 2 functions do not work for WinForm Window.