Note that there are some explanatory texts on larger screens.

plurals
  1. POWindows Form not resizable when on LEFT secondary monitor
    text
    copied!<p>I'm having the weirdest problem here with a Windows App written in c#. </p> <p>Although there is absolutely nothing special about it, the main window works perfectly well on the Primary monitor and on any Secondary monitor when the latter is configured to stand on the right of the Primary monitor. However, when I reconfigure the secondary screen to be placed on the <strong>left</strong> side of my Primary monitor, I (and others) no longer can change the size of the form. The mouse-pointer does NOT change into the 'NW-SE-arrows', nor does clicking &amp; dragging the edge react in any change towards the size of the window. </p> <p>Doing some extra experimenting this seems to surface only when I have the AutoSizeMode of the form set to GrowAndShrink !?</p> <p>Is this some kind of bug or am I misinterpreting the property ?</p> <p>To reproduce this problem you should </p> <ul> <li>start a new WinForms project</li> <li>Add a StatusStrip to the bottom of the form</li> <li>Run the project (Debug/Any CPU in my case)</li> <li>Drag the form to the secondary monitor that stands LEFT of your primary monitor</li> </ul> <p>PS: it seems that when I remove the StatusStrip, I can't resize the form at all, so I'm guessing this is some side-effect/bug in the StatusStrip object... </p> <p>Adding a checkbox with the following code behind makes it pretty clear that the issue revolves around the AutoSizeMode property </p> <pre><code>private void chkAutoGrowAndShrink_CheckedChanged(object sender, EventArgs e) { this.AutoSizeMode = chkAutoGrowAndShrink.Checked ? AutoSizeMode.GrowAndShrink : System.Windows.Forms.AutoSizeMode.GrowOnly; } </code></pre> <hr> <p>UPDATE:</p> <p>As I've recently switched machines I've now redone the test on this new laptop using VS2010 and hold &amp; behold, the issue is no longer. I'm still not sure where this came from, maybe it got fixed in .NET over time, maybe it was a driver issue... I guess we'll never now but it seems there is little use to keep this question here so I'll just mark it for closing. <strong>Thanks</strong> to all who put some of their precious time in it though!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload