This documentation is archived and is not being maintained.

Form.MdiChildren Property

Gets an array of forms that represent the multiple-document interface (MDI) child forms that are parented to this form.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

member MdiChildren : Form[]

Property Value

Type: System.Windows.Forms.Form[]
An array of Form objects, each of which identifies one of this form's MDI child forms.

This property allows you to obtain references to all the MDI child forms currently opened in an MDI parent form. To create an MDI child form, assign the Form that will be the MDI parent form to the MdiParent property of the child form.

You can use this property to loop through all the MDI child forms to perform operations such as saving data to a database when the MDI parent form closes or to update fields on the child forms based on actions performed in your application.

The following code example demonstrates how to use the MdiChildren property to iterate through the list of MDI child forms and add a Button control to each.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.