NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Screen.FromHandle

Retrieves a Screen for the monitor that contains the largest region of the window.

[Visual Basic]
Public Shared Function FromHandle( _
   ByVal hwnd As Integer _
) As Screen
[C#]
public static Screen FromHandle(
   int hwnd
);
[C++]
public: static Screen* FromHandle(
   int hwnd
);
[JScript]
public static function FromHandle(
   hwnd : int
) : Screen;

Parameters

hwnd
The window handle for which to retrieve the monitor.

Return Value

A Screen for the monitor that contains the largest region of the specified window. If no monitor contains any portion of the specified window, then the monitor closest to the window is returned.

See Also

Screen Class | Screen Members | System.WinForms Namespace