Move

Moves a Form or control. Named arguments are not supported.

Syntax

object.Move left, top, width, height

The parts of the Move method syntax are described in the following table.

Part Description
object Optional. An object expression that evaluates to an object. If object is omitted, the Form with the focus is assumed to be object.
left Required. Single-precision value indicating the horizontal coordinate (x-axis) for the left edge of object.
top Optional. Single-precision value indicating the vertical coordinate (y-axis) for the top edge of object.
width Optional. Single-precision value indicating the new width of object.
height Optional. Single-precision value indicating the new height of object.

Remarks

Only the left argument is required. However, to specify any other arguments, you must specify all arguments that appear in the syntax before the argument you want to specify. For example, you cannot specify width without specifying left and top. Any trailing arguments that are unspecified remain unchanged.

For forms and controls in a Frame control, the coordinate system is always in twips. Moving a form on the screen or moving a control in a Frame is always relative to the origin (0,0), which is the upper-left corner. When moving a control on a Form object or in a PictureBox, the coordinate system of the container object is used. The coordinate system or unit of measure is set with the ScaleMode property at design time. You can change the coordinate system at run time with the Scale method.