Home

Introduction to Controls Properties

 

Moving a Control

 

Introduction

When adding a control to a form, it assumes a position based on where the mouse landed when you clicked the form. Most of the time, that position will not be convenient. Moving a control consists of specifying its position by changing its previous left and top values. You can do this either graphically or programmatically.

To move a control graphically:

  • Position the mouse on it until the cursor changes into a cross:
     

    Then click and drag left, right, up or down, until you get to the desired location
  • Click the control (once) to select it. Using your keyboard, press either the left, the up, the right, or the down arrow keys to move the control until you get the desired position

Moving Various Controls

You can also move various controls at the same time. To do this, first select the controls:

  • Position the mouse on one of the selected controls:
     


    Then click and drag left, right, up, down, or diagonally, until you get the desired position
  • Press the left, the up, the right, or the down arrow keys to move the control until you get the desired position

Locking a Control

After adding a control to a form, you can move the control to change its position, as we will learn in the next few sections. In the next lesson, we will learn how you can change the size of a control. The availability of these two operations is controlled by a Boolean property named Locked. The default value of this property is False. Therefore, to prevent the control from being moved or resized, access its Properties window and set the Locked property to True.

 

Home Copyright © 2007 FunctionX, Inc. Next