Screen.FromRectangle Method (Rectangle)

 

Retrieves a Screen for the display that contains the largest portion of the rectangle.

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

public static Screen FromRectangle(
	Rectangle rect
)

Parameters

rect
Type: System.Drawing.Rectangle

A Rectangle that specifies the area for which to retrieve the display.

Return Value

Type: System.Windows.Forms.Screen

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

.NET Framework
Available since 1.1
Return to top
Show: