title: C# - Dynamically created controls overlapping
body: <p>I'm creating a notepad type of application which has the tab functionality. </p>
  
  <p>I have a MenuStrip at the top and I'm creating the TabControl, its TabPages and the RichTextBoxes at run-time and I have set the DockStyle of the TabControl as Fill. My problem is when I run the program the TabContol appears <strong>under</strong> the MenuStrip. It looks like this,</p>
  
  <p><img src="https://i.stack.imgur.com/6q02T.png" alt="enter image description here"></p>
  
  <p>when it <em>should</em> look like this, <strong>below</strong> the MenuStrip. (for this screenshot only I added the TabControl at design time)</p>
  
  <p><img src="https://i.stack.imgur.com/CMX5g.png" alt="enter image description here"></p>
  
  <p>I think the reason is the TabControl gets created on the form before the MenuStrip does. How can I overcome this issue?</p>
  
  <p>Thank you.  </p>