Basic Controls
[ Using VB ]
One of the first things you'll need to know when starting out in Visual Basic is what the controls are and what they do. We'll also teach you some basic uses for each so you know where to use each of them and when.
Pointer: ![]()
All the pointer does is select controls on the form. If you
double click on one of the controls, you can see the code for that control.
Picture Box: ![]()
The picture box is the most common way for you to add a picture to your form.
If you want to change the picture at run time, this control makes it easy for you.
Label: ![]()
A label is a good way to show text. You should include most text
that the user can't change in a label. If you want the user to be able to change the
shown text, you should use the text box.
Text Box: ![]()
The Text Box is a nice way for the user to enter text. You can
set default text that the user can change or you can just leave it empty.
Frame: ![]()
This tool is mainly for grouping controls like option buttons and check
boxes. To use it, just draw the frame and then draw the controls in it.
Command Button: ![]()
This is just a button that the user can click on to run the code behind
the button.
Check Box: ![]()
This is a easy way for the user to select choices that he wants when
more than one of the choices can be selected.
Option Button: ![]()
The option button allows you to show various options that the user may
choose from, but he can only choose one.
Combo Box: ![]()
This is a combination of a list box and a text box. The user can
either select from the list or type in something.
List Box: ![]()
The List Box just shows a list of items the user can select from in a
drop down, orderly manner.
Horizontal Scroll Bar: ![]()
A horizontal scroll bar is used so the user can scroll through some
information or he can select a value of something.
Vertical Scroll Bar: ![]()
Does the same thing as the horizontal scroll bar only it is set up
vertically.
Timer: ![]()
An invisible control that runs code at the selected interval. If
the interval is set to 1000, the code is run every second. (Seconds x 1000)
Drive List Box: ![]()
Displays all the valid drives for the user's computer.
Directory List Box: ![]()
Displays the directories and paths on the computer.
File List Box: ![]()
Displays a list of files.
Shape: ![]()
Allows you to draw various shapes onto the form at design time.
Line: ![]()
Allows you to draw lines on your form at design time.
Image: ![]()
This shows a picture on the form. The pictures in this control
are only for decorative purposes.
Data: ![]()
The data control just provides access to data through bond controls on
whatever form you put it on.
OLE: ![]()
Allows you to link embedded objects from other applications into your
VB project.