Screen.GetBounds Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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)
- Source:
- Screen.cs
- Source:
- Screen.cs
- Source:
- Screen.cs
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
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)
- Source:
- Screen.cs
- Source:
- Screen.cs
- Source:
- Screen.cs
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
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)
- Source:
- Screen.cs
- Source:
- Screen.cs
- Source:
- Screen.cs
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
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
.NET