IContainerControl.ActivateControl Method (Control)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Activates a specified control.

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

abstract ActivateControl : 
        active:Control -> bool


Type: System.Windows.Forms.Control

The Control being activated.

Return Value

Type: System.Boolean

true if the control is successfully activated; otherwise, false.

Notes to Implementers:

When implemented in a class, this method activates the specified Control. The control must be a child of the container control.

The following example inherits from the ScrollableControl class and implements the IContainerControl interface. Implementation is added to the ActiveControl property and the ActivateControl method.

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

.NET Framework
Available since 1.1
Return to top