I’m creating a notepad type of application which has the tab functionality.
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 under the MenuStrip. It looks like this,

when it should look like this, below the MenuStrip. (for this screenshot only I added the TabControl at design time)

I think the reason is the TabControl gets created on the form before the MenuStrip does. How can I overcome this issue?
Thank you.
Use
SetChildIndex.