I’m trying to resize a window using:
[DllImport("user32.dll", SetLastError = true)]
internal static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool rePaint);
This resizes the window as I want to. Unfortunately, the elements inside of the window are not scaling like they would if I used the mouse. I suppose using the mouse fires off a re-draw event and MoveWindow() doesn’t.
So is there a way I can resize another window and make it re-draw, or are there any alternatives?
You could try to use the SetWindowPos function which allows you to specify as flags whether the window should be redrawn or not, also whether it should be resized, etc.