Why is it, that in the Visual Studio WinForms designer I cannot increase the size of my Form above the resolution of the screen I am currently working on? I think it should
Thanks all, especially Ben Schwehn! With the info provided above, if your app uses a base form, you can make the following changes (in C#) which will remove the limitation from all forms inherited from it.
[DllImport("user32.dll", EntryPoint = "MoveWindow")]
private static extern bool MoveWindow(IntPtr hWnd, int x, int y, int w, int h, bool repaint);
protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
{
base.SetBoundsCore(x, y, width, height, specified);
MoveWindow(Handle, x, y, width, height, true);
}
I am working on a design that uses a vertical screen, 1080x1920. Sometimes I need to work on the main form on a different machine that does not have a vertical screen. Every time I work on the main form, the form resolution is forced to 1080x1109. What a pain. The only thing I can do is make the changes, then use Windows multiscreen to change the desktop so one monitor is above the other. Then extend the design window to span 2 monitors, then manually change the size of the form. There is no way this "feature" is not a bug.