Chapter one-VISUAL
Chapter one-VISUAL
VISUAL BASIC
pg. 1
Chapter One Visual Basic 6
Running the Program: After the installation process, a set of shortcuts is added to
the Start menu, including Microsoft Visual Basic 6.0. Within this group, you will
find the shortcut "Microsoft Visual Basic 6.0" responsible for launching Visual
Basic. As shown in the figure below:
pg. 2
Chapter One Visual Basic 6
The "Existing" tab: This tab is used to open a project created previously. It displays
a dialog box that closely resembles the familiar "Open" dialog box found in
Microsoft applications.
The "Recent" tab: It is used to display a list of projects that have been worked on
recently.
Development environment
The Visual Basic language provides an excellent set of integrated tools under the
name Integrated Development Environment, abbreviated as IDE. It offers everything
you need for designing windows, writing code, and even provides you with five-star
services such as debugging, project file management, menu editing, and
creating/editing databases.
pg. 3
Chapter One Visual Basic 6
pg. 4
Chapter One Visual Basic 6
This window is considered the secret to the success of Visual Basic and has been
one of the most iconic windows since the earliest versions. It has an initial title of
'Form1'. Through this window, you can design your program's interface by either
modifying its properties or placing tools on it using the mouse.
Toolbox:
The Toolbox can be described as one of the floating objects in the development
environment. It is a bar that contains 20 standard tools that you can add to your
projects' forms (interfaces). Other tools can be added to this box by clicking on it
with the right mouse button and choosing the Components command. The following
pg. 5
Chapter One Visual Basic 6
After the installation process, a set of shortcuts is added to the Start menu, including
Microsoft Visual Basic 6.0. Within this group, you will find the Microsoft Visual
Basic 6.0 shortcut responsible for launching Visual Basic.
Toolbar Elements:
1- Pointer: This tool reverts the mouse cursor to its default arrow shape after using
other tools (the cursor returns to its normal state after using any other tool).
2- Picture Box: It is a tool used to place images on the form and integrate these
images into the project.
3- Label: This tool allows us to add labels to objects on the form.
4- Text Box: This tool is used to display or input data into the program, such as
employee names, hiring dates, etc.
5- Frame: The frame tool is used as a container for objects that you want to have the
same properties (inheritance property).
6- Button: This is used to place buttons on the form for executing specific commands
like Save, Edit, Exit, Cancel, etc.
7- List Box: This tool is used to create a list on the form containing a group of
options, allowing multiple selections at once.
8- ComboBox: Similar to the List Box tool but displays only one option that can be
used.
9- Timer: This tool is used to execute a specific command after a defined time
interval, with a crucial property called "Interval," which we will discuss later.
10- Drive ListBox: It displays drives in a list, including floppy and compressed
drives.
11- DirListBox: Similar to the previous tool but applies to folders and their contents.
12- FileListBox: Similar to the previous tool but for files.
13- Image: This tool is used to place images on the form, slightly different from the
Picture Box tool.
14- Data: This tool is used for database interaction.
15- Ole: This tool is used to interact with objects like Microsoft Word and Excel.
16- CheckBox: Checkboxes are used for selecting one or more options from a group
of choices.
17- OptionButton: Used for selecting only one option from a group of choices.
18- HscrollBar and VscrollBar: These tools are used to place horizontal or vertical
scroll bars on the window or both.
Important Note:
pg. 6
Chapter One Visual Basic 6
You can divide this toolbox into tabs by right-clicking on it and selecting the 'Add
Tab' option, which opens a dialog asking for a tab name. After naming it, click OK.
Note that the name appears at the bottom of the toolbox. You can place tools within
these tabs by dragging and dropping them. To delete a tab, right-click on it and select
the 'Delete Tab' option. Don't worry; the tools placed within it won't be deleted.
pg. 7