Screen.GetBounds Screen.GetBounds Screen.GetBounds Screen.GetBounds Method

Definition

Retrieves the bounds of the display.

Overloads

GetBounds(Control) GetBounds(Control) GetBounds(Control) GetBounds(Control)

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

GetBounds(Point) GetBounds(Point) GetBounds(Point) GetBounds(Point)

Retrieves the bounds of the display that contains the specified point.

GetBounds(Rectangle) GetBounds(Rectangle) GetBounds(Rectangle) GetBounds(Rectangle)

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

GetBounds(Control) GetBounds(Control) GetBounds(Control) GetBounds(Control)

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

public:
 static System::Drawing::Rectangle GetBounds(System::Windows::Forms::Control ^ ctl);
public static System.Drawing.Rectangle GetBounds (System.Windows.Forms.Control ctl);
static member GetBounds : System.Windows.Forms.Control -> System.Drawing.Rectangle
Public Shared Function GetBounds (ctl As Control) As Rectangle
Parameters
ctl
Control Control Control Control

The Control for which to retrieve the display bounds.

Returns

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

GetBounds(Point) GetBounds(Point) GetBounds(Point) GetBounds(Point)

Retrieves the bounds of the display that contains the specified point.

public:
 static System::Drawing::Rectangle GetBounds(System::Drawing::Point pt);
public static System.Drawing.Rectangle GetBounds (System.Drawing.Point pt);
static member GetBounds : System.Drawing.Point -> System.Drawing.Rectangle
Public Shared Function GetBounds (pt As Point) As Rectangle
Parameters
pt
Point Point Point Point

A Point that specifies the coordinates for which to retrieve the display bounds.

Returns

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

GetBounds(Rectangle) GetBounds(Rectangle) GetBounds(Rectangle) GetBounds(Rectangle)

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

public:
 static System::Drawing::Rectangle GetBounds(System::Drawing::Rectangle rect);
public static System.Drawing.Rectangle GetBounds (System.Drawing.Rectangle rect);
static member GetBounds : System.Drawing.Rectangle -> System.Drawing.Rectangle
Public Shared Function GetBounds (rect As Rectangle) As Rectangle
Parameters
rect
Rectangle Rectangle Rectangle Rectangle

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

Returns

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.

Applies to