Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

NativeWindow.FromHandle Method

Retrieves the window associated with the specified handle.

[Visual Basic]
Public Shared Function FromHandle( _
   ByVal handle As IntPtr _
) As NativeWindow
[C#]
public static NativeWindow FromHandle(
 IntPtr handle
);
[C++]
public: static NativeWindow* FromHandle(
 IntPtr handle
);
[JScript]
public static function FromHandle(
   handle : IntPtr
) : NativeWindow;

Parameters

handle
A handle to a window.

Return Value

The NativeWindow associated with the specified handle. This method returns a null reference (Nothing in Visual Basic) 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 NativeWindow in the current process, otherwise a null reference (Nothing in Visual Basic) is returned.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

NativeWindow Class | NativeWindow Members | System.Windows.Forms Namespace | NativeWindow | Handle | AssignHandle | CreateHandle | DestroyHandle | ReleaseHandle | WndProc

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.