System.Windows.Forms.Control.Location Property

Gets or sets the coordinates of the upper-left corner of the control relative to the upper-left corner of its container.

Syntax

[System.ComponentModel.Localizable(true)]
public System.Drawing.Point Location { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Because the System.Drawing.Point class is a value type (Structure in vbprvb, struct in csprcs), it is returned by value, meaning accessing the property returns a copy of the upper-left point of the control. So, adjusting the System.Drawing.Point.X or System.Drawing.Point.Y properties of the System.Drawing.Point returned from this property will not affect the Control.Left, Control.Right, Control.Top, or Control.Bottom property values of the control. To adjust these properties set each property value individually, or set the Control.Location property with a new System.Drawing.Point.

If the System.Windows.Forms.Control is a System.Windows.Forms.Form, the Control.Location property value represents the upper-left corner of the System.Windows.Forms.Form in screen coordinates.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0