Edit

Share via


Support.GetActiveControl Method

Definition

Caution

Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862

Gets the control that currently has focus.

public:
 static System::Windows::Forms::Control ^ GetActiveControl();
public static System.Windows.Forms.Control GetActiveControl ();
[System.Obsolete("Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862")]
public static System.Windows.Forms.Control GetActiveControl ();
static member GetActiveControl : unit -> System.Windows.Forms.Control
[<System.Obsolete("Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862")>]
static member GetActiveControl : unit -> System.Windows.Forms.Control
Public Function GetActiveControl () As Control

Returns

The control that currently has focus.

Attributes

Remarks

This function is used by the upgrade tools to replace the Visual Basic 6.0 Screen.ActiveControl property. It is the equivalent of calling ActiveControl in Visual Basic.

Note

Functions and objects in the Microsoft.VisualBasic.Compatibility.VB6 namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic 2008. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation.

Applies to