NativeWindow.FromHandle(IntPtr) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得與指定句柄相關聯的視窗。
public:
static System::Windows::Forms::NativeWindow ^ FromHandle(IntPtr handle);
public static System.Windows.Forms.NativeWindow FromHandle(IntPtr handle);
public static System.Windows.Forms.NativeWindow? FromHandle(IntPtr handle);
static member FromHandle : nativeint -> System.Windows.Forms.NativeWindow
Public Shared Function FromHandle (handle As IntPtr) As NativeWindow
參數
- handle
-
IntPtr
nativeint
窗戶的把手。
傳回
與 NativeWindow 指定的帳號相關聯。 當 handle 沒有相關視窗時,此方法會回傳 null 。
備註
如果你從其他方法收到 handle ,請使用此方法取得與 handle 相關的視窗。 該 handle 必須在當前程序中已被他人 NativeWindow 擁有;否則 null 會被回傳。