Form.Location 屬性

定義

取得或設定 Point,代表螢幕座標中 Form 的左上角。

public:
 property System::Drawing::Point Location { System::Drawing::Point get(); void set(System::Drawing::Point value); };
[System.ComponentModel.SettingsBindable(true)]
public System.Drawing.Point Location { get; set; }
[<System.ComponentModel.SettingsBindable(true)>]
member this.Location : System.Drawing.Point with get, set
Public Property Location As Point

屬性值

Point

Point,代表螢幕座標中 Form 的左上角。

屬性

備註

Point 是 結構,這表示它是實值型別。 如果您在 中 Point 存取屬性,則會傳回屬性的複本。 因此,變更 XLocation 屬性傳回之 的 PointY 屬性,不會影響 Left 的 、 RightTopBottom 屬性值 Form 。 若要調整這些屬性,請個別設定每個屬性值,或使用新的 Point 設定 Location 屬性。

屬性 Location 會取得或設定 Location 基類的 Control 屬性,並將 屬性設定 Bindabletrue

適用於

另請參閱