MdiClient::ControlCollection::Add Method (Control^)

 

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

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

public:
virtual void Add(
	Control^ value
) override

Parameters

value
Type: System.Windows.Forms::Control^

MDI Child Form to add.

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);

.NET Framework
Available since 1.1
Return to top
Show: