Screen.FromHandle Method (IntPtr)

 

Retrieves a Screen for the display that contains the largest portion of the object referred to by the specified handle.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public static Screen FromHandle(
	IntPtr hwnd
)

Parameters

hwnd
Type: System.IntPtr

The window handle for which to retrieve the Screen.

Return Value

Type: System.Windows.Forms.Screen

A Screen for the display that contains the largest region of the object. In multiple display environments where no display contains any portion of the specified window, the display closest to the object is returned.

SecurityPermission

to get an object from a Win32 handle. Associated enumeration: SecurityPermissionFlag.UnmanagedCode

.NET Framework
Available since 1.1
Return to top
Show: