CyberiaPC.com Main Page




Learning VB

Manipulating the Different Controls and Components

In this section, we'll take a closer at the many controls available in Visual Basic.  Most of these are located in the Tool Box and can be easily drawn on your forms.

Combo Boxes and List Boxes
Frames, Option Buttons and Check Boxes
Using the Timer Control
Adding Additional Controls to your Tool Box

Adding Additional Controls to your Tool Box

There are many other controls that you can use in VB.  These controls are not visible by default, so you're going to have to add them to your Tool Box.  There are many cool controls that can be unveiled and used in your projects.

To add new controls to your Tool Box:

1. Click on Project, then Components

2. Make sure you're on the Controls tab, check the controls that you want and then click OK.  Here is a table that shows the most commonly used controls and where they are in the list:

Control Where to Find it Description
TabStrip Microsoft Windows Common Controls 6.0

Use the TabStrip control to create tabbed dialog boxes similar to those found throughout the Windows environment. For example, the Display dialog box in the Control Panel.

ToolBar 
Microsoft Windows Common Controls 6.0 Use the ToolBar control to add a toolbar to a form. Typically, the buttons in a toolbar correspond to items in an application’s menu, providing a more direct way for the user to access an application’s commands.
StatusBar Microsoft Windows Common Controls 6.0 Use the StatusBar control to display information about the current state of the application at the bottom of an application window. For example, in Microsoft Word, the status bar displays the current page and section number of a document.
Progress Microsoft Windows Common Controls 6.0 Use the Progress control to let the user know that the application is processing information and how far in the process it has progressed. When you copy or move files in Windows, for example, a progress indicator gives you immediate feedback about the operation.
TreeView Microsoft Windows Common Controls 6.0 Use the TreeView control to display a hierarchical list of entries, each of which consists of a label and an optional bitmap. A tree view is typically used to display the headings in a document, the entries in an index, the files and directories on a disk, or any other kind of information that might usefully be displayed as a hierarchy.
ImageList Microsoft Windows Common Controls 6.0 Use the ImageList control to contain a collection of images that can be used by other controls. The ToolBar control, for instance, can retrieve the images for the toolbar buttons from an ImageList control.
ListView Microsoft Windows Common Controls 6.0 Use the ListView control to display a collection of items, such as files or folders. A ListView control has four display modes: Large Icons, Small Icons, List, and Details. An example of a ListView control can be found in the right side of Windows Explorer; from the View menu, you can view the different modes by selecting the corresponding command.
Slider 
Microsoft Windows Common Controls 6.0 Use the Slider control to display a slider and optional measurement marks. The user can move the slider by dragging it, clicking the mouse to either side of the slider, or using the keyboard. Slider controls are useful when you want the user to select a discrete value. Examples of the Slider control can be found in the Mouse Properties dialog box in the Control Panel in Windows.
ImageCombo Microsoft Windows Common Controls 6.0 Use the ImageCombo control to implement a picture-enabled version of the standard Windows combo box. Each item in the list portion of the control can have a picture assigned to it.
Animation Microsoft Windows Common Controls -2 6.0 Use the Animation control to create buttons that display animations, such as .avi files, when clicked. The control can play only .avi files that have no sound. In addition, the Animation control can display only uncompressed .avi files, or .avi files that have been compressed using Run-Length Encoding (RLE).
UpDown 
Microsoft Windows Common Controls -2 6.0 Use the UpDown control to create a pair of arrow buttons that the user can click to increment or decrement a value, such as a scroll position or a value in an associated control, known as a buddy control.
MonthView Microsoft Windows Common Controls -2 6.0 Use the MonthView control to create applications that let users view and set date information via a calendar-like interface.
DTPicker Microsoft Windows Common Controls -2 6.0 Use the DateTimePicker control to provide a formatted date field that allows easy date selection. In addition, users can select a date from a dropdown calendar interface, similar to the MonthView control.
FlatScrollBar Microsoft Windows Common Controls -2 6.0 Use the FlatScrollBar control to provide a mouse-sensitive version of the standard Windows scroll bar that offers two-dimensional formatting options. It can also replace the standard Windows three-dimensional scroll bar. The flat scroll bar provides increased interactivity when using the scroll arrows and the scroll box.
CoolBar 
Microsoft Windows Common Controls -3 6.0 Use the CoolBar control to contain a collection of objects used to create a configurable toolbar that is associated with a form.
Information within this table taken from Microsoft

{Go Back To VB Lessons Page}