Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: Create Tabbed MDI Interface
07-16-2009, 06:49 PM #1
- Join Date
- Jul 2009
- Thanked 0 Times in 0 Posts
Create Tabbed MDI Interface
I am using C# 2005 to develop an Windows application. I am planning to use a Tab Container to display the child forms. I have used a Menu Strip to display the menu and have set IsMDIContainer = true property of the MainMenu form. The MainMenu form also contains a Tab Control and I plan to display all child forms as Tap Pages in the Tab Control.
Till now I have been able to add Tab Pages when the user chooses a menu option. But I don't know how to display the child form itself within the Tab Page.
I have used the following code in the menu click event.
frmPurchaseEntry PurchaseEntry = new frmPurchaseEntry; PurchaseEntry.MdiParent = this; PurchaseEntry.TabCtrl = tabControl1; TabPage tpPurchaseEntry = new TabPage(); tpPurchaseEntry.Parent = tabControl1; tpPurchaseEntry.Text = "Purchase Entry"; tpPurchaseEntry.Show(); PurchaseEntry.TabPag = tpPurchaseEntry; PurchaseEntry.Show(); tabControl1.SelectedTab = tpPurchaseEntry;
Lalit Kumar Barik