title: Problem with usercontrol scaling when added at run-time in .Net, WinForms
body: <p>Here's a link to a tiny VB.Net 2008 sample: </p>
  
  <p><a href="http://www.4shared.com/file/255391716/26c45c1e/UserControlTest.html" rel="nofollow noreferrer">http://www.4shared.com/file/255391716/26c45c1e/UserControlTest.html</a></p>
  
  <p>And, a C# sample:</p>
  
  <p><a href="http://www.4shared.com/file/255392906/27f4efbb/UserControlTestCHash.html" rel="nofollow noreferrer">http://www.4shared.com/file/255392906/27f4efbb/UserControlTestCHash.html</a></p>
  
  <p>Apologies but its a free hoster, so you have to wait 10 seconds.</p>
  
  <p>First here's the steps to replicate, then I'll explain what the problem is:</p>
  
  <p>(1) Create a System.Windows.Forms.UserControl and add a button to the bottom-right hand corner. Leave the button anchor as default (top-left). Add some more buttons dotted around so that you can see that they scale correctly.</p>
  
  <p>(2) Add the UserControl to a form in the construtor, <i>after</i> the InitializeComponent call.  </p>
  
  <p>(3) Run the form.  </p>
  
  <p>(4) Increase the form font size some way (eg click a form button).</p>
  
  <p>All the controls within the usercontrol scale perfectly but the usercontrol itself doesn't. It's width and height are increased by way too much. Look at the margin now between the button at the bottom-right hand corner and the usercontrol.</p>
  
  <p>To correct the problem, the usercontrol must be added <i>before</i> the InitializeComponent call.</p>
  
  <p>If it wasn't possible for me to add the usercontrol before InitializeComponent, is there any way for me to correct the scaling?</p>