System.Windows.Forms.NativeWindow.FromHandle Method

Retrieves the window associated with the specified handle.

Syntax

public static NativeWindow FromHandle (IntPtr handle)

Parameters

handle
A handle to a window.

Returns

The System.Windows.Forms.NativeWindow associated with the specified handle. This method returns null when the handle does not have an associated window.

Remarks

If you receive a handle from another method, use this method to retrieve the window associated with the handle. The handle must already be owned by another System.Windows.Forms.NativeWindow in the current process; otherwise, null is returned.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0