Category / Section
How to browse through the MDIChildren in my MDIContainer after enabling WinForms Tabbed MDIManager?
1 min read
Browse through MDIChildren
The TabbedMDIManager’s MDIChildren property is used to get a list of MDIChildren present in MDIContainer forms. Please refer the below code snippet which illustartes this:
C#
string children = String.Empty;
foreach(Form form in this.tabbedMDIManager.MdiChildren)
{
children += form.Text + "\r\n";
}
MessageBox.Show(children);
VB
Dim children As String = String.Empty Dim form As Form For Each form In Me.tb.MdiChildren children += form.Text & Constants.vbCrLf Next MessageBox.Show(children)
Note:
The MDIContainer form’s MDIChildren property returns some additional MDIChildren which are not actually used in the application, so it is necessary to avoid this property to get a list of MDIChildren present in MDIContainer forms.