In this article I will try to explain you, how you can create a Multi-Documented Tabbed Interface in C#.

Create a new application in C#. Change the Form1 into mdi from by changing its property isMdiContainer to true. create another form i.e. from2

Drag a tab control and main menu control on form1.create a file menu with new as a sub menu and window menu with cascade, tile Horizontal and tile vertical sub menus. Create a global variable in form1 to count the number of the child forms:

int childCount = 1;

Now write following code on cascade menu item click event:

privatevoid menuItem4_Click(object sender, System.EventArgs e)

{

this.LayoutMdi(MdiLayout.Cascade);

}

Write following code on tile Horizontal menu item click event:

privatevoid menuItem5_Click(object sender, System.EventArgs e)

{

this.LayoutMdi(MdiLayout.TileHorizontal);

}

Write following code on tile vertical menu item click event:

privatevoid menuItem6_Click(object sender, System.EventArgs e)

{

this.LayoutMdi(MdiLayout.TileVertical);

}

Now double click on the tab control and write following code on tabControl1 SelectedIndexChanged event:

I have used your code as a starting point. I have a child form which contains a rich text box. I can't work out how to know which tab to copy or paste text from/to when working with the clipboard. I have the Clipboard.SetDataObject code working. I just don't seem to be able to cut or paste the the selected tab. Thanks in advance for any help you can provide.
jim

Posted on
3/29/2007 9:20:13 AM
by
Jim Keating

Aiman

How do I work form the MDI of explanation supported by pictures

Posted on
3/24/2010 5:53:48 PM
by
Aiman

Jason

please explain this part: childForm.TabCtrl = tabControl1;

a form does not have a "TabCtrl" property, but i saw you created thisbut its craeated as a tabcontrol? why is this? doesnt make sence?please mail me your view on this