Redigeeri

Jagamisviis:


Screen.GetBounds Method

Definition

Retrieves the bounds of the display.

Overloads

GetBounds(Control)

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

GetBounds(Point)

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

GetBounds(Rectangle)

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

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

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.

Applies to

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

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.

Applies to

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

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