MdiClient.ControlCollection.Add(Control) Method

Definition

Adds a control to the multiple-document interface (MDI) Container.

C#
public override void Add(System.Windows.Forms.Control value);
C#
public override void Add(System.Windows.Forms.Control? value);

Parameters

value
Control

MDI Child Form to add.

Remarks

This child must be a Form that is marked as an MDI Child to be added to the container. You should not call this directly, but rather set the child form's (ctl) MDIParent property:

// incorrect  
Form child = new ChildForm();  
this.getMdiClient().add(child);  
// correct  
Form child = new ChildForm();  
child.setMdiParent(this);  

Applies to

Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9