Control::ControlCollection::Remove Method (Control^)
Removes the specified control from the control collection.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
When a Control is removed from the control collection, all subsequent controls are moved up one position in the collection.
Notes to Inheritors:
When overridingin a derived class, be sure to call the base class's method to ensure that the control is removed from the collection.
The following code example removes a Control from the Control::ControlCollection of the derived class Panel if it is a member of the collection. The example requires that you have created a Panel, a Button, and one or more RadioButton controls on a Form. The RadioButton controls are added to the Panel control, and the Panel control is added to the Form. When the button is clicked, the radio button named radioButton2 is removed from the Control::ControlCollection.
Available since 1.1