Control.FromHandle(IntPtr) Méthode

Définition

Retourne le contrôle actuellement associé au handle spécifié.

public:
 static System::Windows::Forms::Control ^ FromHandle(IntPtr handle);
public static System.Windows.Forms.Control FromHandle (IntPtr handle);
static member FromHandle : nativeint -> System.Windows.Forms.Control
Public Shared Function FromHandle (handle As IntPtr) As Control

Paramètres

handle
IntPtr

nativeint

Handle de fenêtre (HWND) à rechercher.

Retours

Control

Control qui représente le contrôle associé au handle spécifié ; retourne null en l'absence d'un contrôle associé au handle spécifié.

Remarques

Utilisez la FromChildHandle méthode si vous devez retourner des contrôles qui possèdent plusieurs handles.

S’applique à

Voir aussi