Screen::GetBounds Method (Rectangle)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Retrieves the bounds of the display that contains the largest portion of the specified rectangle.

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

public:
static Rectangle GetBounds(
	Rectangle rect
)

Parameters

rect
Type: System.Drawing::Rectangle

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

Return Value

Type: System.Drawing::Rectangle

A Rectangle that specifies the bounds of the display that contains the specified rectangle. In multiple display environments where no monitor contains the specified rectangle, the monitor closest to the rectangle is returned.

.NET Framework
Available since 1.1
Return to top
Show: