Screen.GetBounds 方法

定义

检索显示器的边界。

重载

名称 说明
GetBounds(Control)

检索包含指定控件最大部分的显示边界。

GetBounds(Point)

检索包含指定点的显示边界。

GetBounds(Rectangle)

检索包含指定矩形最大部分的显示器边界。

GetBounds(Control)

Source:
Screen.cs
Source:
Screen.cs
Source:
Screen.cs
Source:
Screen.cs
Source:
Screen.cs

检索包含指定控件最大部分的显示边界。

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

参数

ctl
Control

Control要为其检索显示边界的边界。

返回

一个 Rectangle ,指定包含指定控件的显示边界。 在没有显示控件包含指定控件的多个显示环境中,将返回最接近该控件的显示。

适用于

GetBounds(Point)

Source:
Screen.cs
Source:
Screen.cs
Source:
Screen.cs
Source:
Screen.cs
Source:
Screen.cs

检索包含指定点的显示边界。

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

参数

pt
Point

一个 Point ,指定要为其检索显示边界的坐标。

返回

一个 Rectangle ,指定包含指定点的显示边界。 在没有显示包含指定点的多个显示环境中,将返回最接近该点的显示。

适用于

GetBounds(Rectangle)

Source:
Screen.cs
Source:
Screen.cs
Source:
Screen.cs
Source:
Screen.cs
Source:
Screen.cs

检索包含指定矩形最大部分的显示器边界。

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

参数

rect
Rectangle

一个 Rectangle ,指定要为其检索显示边界的区域。

返回

一个 Rectangle ,指定包含指定矩形的显示边界。 在没有监视器包含指定矩形的多个显示环境中,将返回离矩形最近的监视器。

适用于