Control.FromHandle(IntPtr) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
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);
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
Qui Control représente le contrôle associé au handle spécifié ; retourne null si aucun contrôle avec le handle spécifié est trouvé.
Remarques
Utilisez la FromChildHandle méthode si vous devez retourner des contrôles qui possèdent plusieurs handles.