Screen.GetBounds 方法

定義

擷取顯示的界限。

多載

GetBounds(Control)

擷取包含指定控制項最大部分的顯示界限。

GetBounds(Point)

擷取包含指定點的顯示界限。

GetBounds(Rectangle)

擷取包含指定矩形最大部分的顯示界限。

GetBounds(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

參數

ctl
Control

用來擷取顯示界限的 Control

傳回

Rectangle,指定包含指定控制項的顯示界限。 在任何顯示皆不包含指定控制項的多重顯示環境中,會傳回離控制項最近的顯示。

適用於

GetBounds(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

參數

pt
Point

Point 指定用來擷取顯示界限的座標。

傳回

Rectangle,指定包含指定點的顯示界限。 在任何顯示皆不包含指定點的多重顯示環境中,會傳回離點最近的顯示。

適用於

GetBounds(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

參數

rect
Rectangle

Rectangle,指定要為其擷取顯示範圍的區域。

傳回

Rectangle,指定包含指定矩形的顯示界限。 在任何監視器皆不包含指定矩形的多重顯示環境中,會傳回離矩形最近的監視器。

適用於