VB Move Method: How to Use It

In VB, the Move method is used to move a control to a specified position. Here is the syntax for the Move method:

control.Move Left, Top, Width, Height

Left and Top represent the coordinates of the new position of the control’s top left corner, while Width and Height indicate the width and height of the control.

For example, to move a button named Button1 to position (100, 100) while maintaining the original width and height, you can use the following code:

Button1.Move 100, 100, Button1.Width, Button1.Height

It’s important to note that the Move method is only applicable to visual controls such as buttons, text boxes, etc.

bannerAds