NativeWindow.FromHandle(IntPtr) 方法

定義

擷取與指定控制代碼關聯的視窗。

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

與指定控制代碼相關的 NativeWindow。 當控制代碼沒有相關的視窗時,這個方法會傳回 null

備註

如果您收到另一個方法的控制碼,請使用這個方法來擷取與控制碼相關聯的視窗。 控制碼必須已經由目前進程中的另一個 NativeWindow 擁有;否則 null 會傳回 。

適用於

另請參閱