Move Method
Object List Next Object
Defined By: Window
Description:
Moves a form or control.
Declaration:
Sub Move (ByVal left_ As Single ,ByVal top As Single, ByVal width as Single, ByVal height As Single)
Syntax Description
object Form or control to move, excluding timers and menus.
left_ The new horizontal coordinate for object's left edge. Expressed as a single-precision value.
top The new vertical coordinate for object's top edge. Expressed as a single-precision value.
width object's new width. Expressed as a single-precision value.
height object's new height. Expressed as a single-precision value.
Details:
For top-level forms, the coordinate system used is always twips. A form on the
screen is always moved in relation to the origin (0,0), which is the
upper-left corner of the display. The coordinate system of the containing object is used
when moving controls or embedded forms. The coordinate system is determined by
the container’s settings for the ScaleMode, ScaleLeft, ScaleTop, ScaleWidth, and ScaleHeight
properties.
Note: Invoking the Move method of an object has the same effect as simultaneously
setting the Left, Top, Width, and Height properties of that object. If you only
wish to change one of those, setting the corresponding property is usually
more efficient than invoking the Move method. If, however, you are changing more
than one of the size or position properties, using the Move method is usually
more efficient.
See Also:
Height, Left, Top, Width properties