

Thanks for taking the time to write this.
#TAB BROWSER STYLE CODE#
( as Form).Activate() īy using the above logic, the child form does not need to know about the logic contained in the mdimain form which makes the code much cleaner. activate the child if(tabControl.SelectedTab != null) Private void tabControl_SelectedIndexChanged( object sender, EventArgs e) Void childForm_Closing( object sender, e) Tp.Tag = childForm // hold a reference to the form creating MDI child form and initialize its fieldsĬhildForm.Text = " MDIChild " + childCount++ ĬhildForm.Closing += childForm_Closing // add a closing event // add a TabPage and enable it

Later, we will see that these two objects will contain references to the TabControl in the parent form and the corresponding child TabPage.Ĭopy Code private void newMenuItem_Click( object sender, EventArgs e) Next, in the child form, create a non-initialized TabControl and a TabPage. Attach a TabControl component to the form and set the Dock property to Top. The codeįirst, in the parent form, set the IsMDIContainer property to true. The template can be used for creating a tab-page capable window program. The source code is a template of the tab page window application. All that is needed is a little creativity.

After failing to find an article on it, I decided to write one myself to show any interested reader that creating an MDI tab page browsing can be done with pretty simple but neat coding. Multi Document Interface (MDI) tab page browsing has been very popular among many Windows applications especially internet browsers such as Opera, Mozilla, Maxthon and many others.
