title: Why is my form being resized when it is displayed?
body: <p>I have a form that appears as a modal dialog. The form looks like this in the designer:</p>
  
  <p><img src="https://i.stack.imgur.com/wOLge.png" alt="as in the design view in Visual Studio">
  (width = 360, height = 215)</p>
  
  <p>When it is shown in the application, it gets 10 pixels taller and wider than is defined, leaving a wide margin around the bottom and left edges:</p>
  
  <p><img src="https://i.stack.imgur.com/R8Ts6.png" alt="as in the running application">
  (width = 370, height = 225)</p>
  
  <p>The form is explicitly set to be 360x215 pixels in dimension, has a border style of <code>FixedDialog</code>, inherits from <code>System.Windows.Forms.Form</code>, and has no code in it to manipulate the dimensions (with the exception of the auto-generated designer file). If I change the border style to <code>FixedSingle</code> or <code>FixedToolWindow</code> it appears the correct size (but I want it styled as <code>FixedDialog</code>).</p>
  
  <p>Any idea what is causing this?</p>
  
  <hr>
  
  <p>I've fixed this by removing the <code>MinimumSize</code> setting on the form. It appears that if it is set to the same size (or near, but I haven't quite found the threshold yet) as the <code>Size</code> property, the margins are introduced. As the form is not resizable, I don't need the <code>MinimumSize</code> set so it can be removed.</p>
  
  <p>I still don't understand <strong><em>why</em></strong> this is the case though.</p>