System.Windows.Forms.Form.OwnedForms Property

Gets an array of System.Windows.Forms.Form objects that represent all forms that are owned by this form.

Syntax

[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.ComponentModel.Browsable(false)]
public Form[] OwnedForms { get; }

Value

Documentation for this section has not yet been entered.

Remarks

This property returns an array that contains all forms that are owned by this form. To make a form owned by another form, call the Form.AddOwnedForm(Form) method. The form assigned to the owner form will remain owned until the Form.RemoveOwnedForm(Form) method is called. You can also make a form owned by another by setting the Form.Owner property with a reference to its owner form.

When a form is owned by another form, it is closed or hidden with the owner form. For example, consider a form named Form2 that is owned by a form named Form1. If Form1 is closed or minimized, Form2 is also closed or hidden. Owned forms are also never displayed behind their owner form. You can use owned forms for windows such as find and replace windows, which should not be displayed behind the owner form when the owner form is selected.

Note:

If the form is a multiple-document interface (MDI) parent form, this property will return all forms that are displayed with the exception of any MDI child forms that are currently open. To obtain the MDI child forms opened in an MDI parent form, use the Form.MdiChildren property.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0
Since: .NET 2.0