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.

toolbar2.gif (8738 bytes)


Pointer: wpe4.jpg (937 bytes)
    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 Boxwpe1.jpg (969 bytes)
   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: wpe6.jpg (787 bytes)
    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: wpe8.jpg (852 bytes)
    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: wpe9.jpg (772 bytes)
    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: wpeA.jpg (774 bytes)
    This is just a button that the user can click on to run the code behind the button.


Check Box: wpeB.jpg (750 bytes)
    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: wpeC.jpg (746 bytes)
    The option button allows you to show various options that the user may choose from, but he can only choose one.


Combo Box: wpeD.jpg (858 bytes)
    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: wpeE.jpg (790 bytes)
    The List Box just shows a list of items the user can select from in a drop down, orderly manner.


Horizontal Scroll Bar: wpeF.jpg (774 bytes)
    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: wpe10.jpg (806 bytes)
    Does the same thing as the horizontal scroll bar only it is set up vertically.


Timer: wpe11.jpg (865 bytes)
    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: wpe12.jpg (765 bytes)
    Displays all the valid drives for the user's computer.


Directory List Box: wpe13.jpg (837 bytes)
    Displays the directories and paths on the computer.


File List Box: wpe14.jpg (815 bytes)
    Displays a list of files.


Shape: wpe15.jpg (874 bytes)
    Allows you to draw various shapes onto the form at design time.


Line: wpe16.jpg (703 bytes)
    Allows you to draw lines on your form at design time.


Image: wpe17.jpg (937 bytes)
    This shows a picture on the form.  The pictures in this control are only for decorative purposes.


Data: wpe18.jpg (869 bytes)
    The data control just provides access to data through bond controls on whatever form you put it on.


OLE: wpe19.jpg (874 bytes)
    Allows you to link embedded objects from other applications into your VB project.