Placing Controls on a Form

When you create a custom form, you place various controls that are available in the Toolbox (Figure 10-9) on an empty form. The type of control you select depends on the type of data the control will have to store and the functionality of your form. The Toolbox is always visible when you work with your form. You can move it around on the screen, change its size, or close it when all controls are already on the form and all you want to do is work with their properties. The Toolbox that was temporarily removed from the screen can be redisplayed by choosing View | Toolbox.

Working with the Toolbox is easy. To add a new control to a form, first click the control image in the Toolbox and then click the form or draw a frame. Clicking on a form (without drawing a frame) will place a control in its default size. The standard settings of each control can be looked up in the Properties window. For example, the standard text box size is 18 x 72 points (see the Height and Width properties of the text box).

After placing a control on a form, the Select Object button (represented by the arrow) becomes the active control in the Toolbox. When you doubleclick a control in a Toolbox, you can draw as many instances of this control as you want. For example, to quickly place three text boxes on your form, double-click the text box control in the Toolbox and then click three times on the form. To deactivate the selected control, click the Select Object button in the Toolbox.

0 0

Post a comment