Drawing a Control

See Also1K9SJMQ

A control is a graphical object drawn with the tools in the Toolbox414LEZP.  Each control has a set of properties3MRB2KQ, events1L2S0SZ, and methods1XB6QBF that can be used to add specialized functionality to your application141RJVK.

To draw a control

   1. In the Toolbox, select the tool you want.

   2. Click the form where you want to place the control.

     As you move the pointer onto the form, it changes to a cross hair21ZJ44P.

   3. Click and drag the cross hair to make the item the size you want.

Drawing shortcut

         In the Toolbox, double-click the tool you want.

     The control appears in the center of the form.  Move and resize it as desired for your application.


Note   Option buttons217W4B9 always work as part of a group.  Selection of one button within a container immediately clears all other buttons in the group.  If you want to create more than one option group on a form, draw each set of option buttons inside a frame1L3O6RK or picture box3W9LV25.


For details on the properties, events, and methods that pertain to each control, see the individual control topics under Controls11BTM4A.

See Also


Attaching an Event Procedure to a Form or Control2LBGK4C

Creating a Control ArrayBRU4A5

Setting Form and Control Properties1NFIWMG


Learning Visual Basic:

Creating an Application

Working with Forms and Controls


Programmer's Guide:

Chapter 2, "Your First Visual Basic Application"

Chapter 3, "Creating and Using Controls"