We're using SetWindowPos to well, set the position of a window and it's working great.
The only qualm I have with it, is that if the window we're moving is maximized, then it will move and become the proper size, however, it will still believe itself to be in the maximized state, and continue showing the "Restore" button.
Is there a way, once SetWindowPos is called, to tell that window to replace the Maximize button?
Also note: These windows aren't necessarily Windows Forms windows, but could be applications such as Explorer, Chrome, Firefox, Notepad, etc.
Here's our call to SetWindowPos:
PInvokeMethods.SetWindowPos(
hwnd, 0,
position.Left + x, position.Top + y, position.Width, position.Height,
PInvokeMethods.SWP_NoZOrder | PInvokeMethods.SWP_NoActivate);