Moves an MDIForm, Form, or control. Doesn't support named arguments.
Syntax
object.Move left, top, width, height
The Move method syntax has these parts:
Part | Description |
object | Optional. An object expression that evaluates to an object in the Applies To list. 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 can't 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 (or an MDI child form on an MDIForm object), 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.