Assembly: PresentationCore (in presentationcore.dll)
The provided window handle.
Return ValueThe HwndSource object for the window that is specified by the hwnd window handle.
This method is not available in the Internet security zone, or for partial trust in general.
You can use this method to return an HwndSource for a window that is not explicitly an interoperation window. The procedure for this is:
Get the value of the Handle property from that WindowInteropHelper instance.
Pass that HWND value as a parameter to FromHwnd.
This technique can be useful if you then want to add general AddHook message processing to the window. However, whenever you create a HwndSource, you are also responsible for destroying it. This is true even if the Application object for an application is HwndSource is disposed. For more information, see Remarks on HwndSource.
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter EditionThe Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.