Moves or sizes an object.
Object.Move ( [fLeft] [, fTop] [, fWidth] [, fHeight] )
The Move method syntax has the following parts:
Name |
Type |
Description |
Object |
AForm |
AForm object |
fLeft |
Val Variant |
The horizontal coordinate (x-axis) for the left edge of object. |
fTop |
Val Variant |
The vertical coordinate (y-axis) for the top edge of object. |
fWidth |
Val Variant |
The new width of object. |
fHeight |
Val Variant |
The new height of object. |
fLeft and fTop is always relative to the top left (0,0) origin of screen. 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.
The method causes the OnMove event to be called if the window position Left or Top properties is changed or the OnResize event to be called if the Width or Height is changed.
The following statement moves the AForm to the new coordinates of x=50 and y=60 while keeping the width and the height the same:
frm1.Move(50,60)
Center, Height, Left, MDIActiveForm, MDIArrange, Moveable, OnMove, OnResize, Scale, ScaleHeight, ScaleMode, ScaleWidth, Top, Width