Visual Basic
Visual Basic (VB) is an event-driven programming language and environment from Microsoft that provides a graphical user interface (GUI) which allows programmers to modify code by simply dragging and dropping objects and defining their behaviour and appearance.
The Integrated Development Environment
One of the most significant changes in Visual Basic 6.0 is the Integrated Development Environment (IDE). IDE is a term commonly used in the programming world to describe the interface and environment that we use to create our applications. It is called integrated because we can access virtually all of the development tools that we need from one screen called an interface. The IDE is also commonly referred to as the design environment, or the program.
The Visual Basic IDE is made up of a number of components
- Menu Bar
- Tool Bar
- Project Explorer
- Properties window
- Form Layout Window
- Toolbox
Fig 1: The Visual Basic Start-Up Dialog Box
Menu Bar
This Menu Bar displays the commands that are required to build an application. The main menu items have sub menu items that can be chosen when needed. The toolbars in the menu bar provide quick access to the commonly used commands and a button in the toolbar is clicked once to carry out the action represented by it.
Toolbox
The Toolbox contains a set of controls that are used to place on a Form at design time thereby creating the user interface area. Additional controls can be included in the toolbox by using the Components menu item on the Project menu.
Fig 2: Toolbox Window

Pointer
The only item in the Toolbox that doesn't draw a control. When you pick the pointer, you
can only resize or move a control that has already been drawn on a form.
Picture Box
This is use to display graphical images as a container to input pictures.
Text Box
This control holds text that the user can change. Can be used for output or input.
Frame
Serves as a visual and functional container for controls
Command Button
Used to carry out the specified action when the user chooses it.
Check Box
Displays a True/False or Yes/No option.
Option Button
Option Button control which is a part of an option group allows the user to select only one option even it displays multiple choices.
List Box
Displays a list of items from which a user can select one.
Combo Box
Contains a Text Box and a List Box. This allows the user to select an item from the dropdown List Box, or to type in a selection in the Text Box.
H Scroll Bar & V Scroll Bar
These controls allow the user to select a value within the specified range of values
Timer
Executes the timer events at specified intervals of time
Drive List Box
Displays the valid disk drives and allows the user to select one of them.
Dir List Box
Allows the user to select the directories and paths, which are displayed.
File List Box
Displays a set of files from which a user can select the desired one.
Shape
Used to add shape (rectangle, square or circle) to a Form
Line
Used to draw straight line to the Form
Image
Used to display images such as icons, bitmaps and metafiles. But less capability than the Picture Box
Data
Enables the use to connect to an existing database and display information from it.
OLE
Used to link or embed an object, display and manipulate data from other windows based applications.
Label
Allows you to have text that you don't want the user to change, such as a caption under a graphic.
Project Explorer
The Project Explorer is a special window in the VBE that shows each of the elements of your VBA project.
Fig 3: Project Explorer Window
Form Layout Window
Form Layout window is a simple visual basic design tool whose purpose is to give the user a thumbnail view of the current form.
Fig 4: Form Layout Window
Properties Window
The Properties window is used to display properties for objects selected in the two main types of windows available in the Visual Studio integrated development environment (IDE).
Fig 5: Properties Window
Toolbar
The Toolbar provides the user quick access to the most commonly used functions of a program.
Example Program: ODD OR EVEN
Coding
Private Sub command1_click()
If Val((Text1) Mod 2) = 0 Then
Label3.Caption = "It is a EVEN number"
Else
Label3.Caption ="It is a ODD number"
End If
End Sub
Private Sub command2_click()
End
End Sub
Input Form
Comments
Post a Comment