You are on page 1of 10

Lecture 1 Assistant Teacher: Rasha Muthna Jameel

Visual Basic programming language

V. Basic 6 is a high-level programming language that divides the


programming languages into:
1- High-level languages
2- Low Level Language
What is meant by high-level programming languages is that their code is
close to human speech language, and this in turn is divided into two parts:
• Text languages
• Visual languages
Examples of scripting languages are: Pascal, Basic, and C ++....... As for
visual languages: Visual Basic, C #, Delphi....
Whereas, low-level programming languages are intended to deal with the
computer directly without the need for an intermediary or what is called a
compiler- such as assembly languages (0, 1).
We return to Visual Basic, as it is used to design programs that run under
the Windows operating system, and therefore those who want to learn this
language must be familiar with the way to deal with the Windows
operating system.
Visual Basic is one of the event-driven languages, like most visual
programming languages (Delphi, Visual, C ++ ....), and the event-driven
language is a language that depends on the idea of splitting the program
into small partial programs that are executed when a specific event occurs,
such as pressing one of the buttons, moving The mouse pointer over a
certain window, the passage of a period of time..... Therefore, when you
start the program, you must specify the events and how to respond to each
Lecture 1 Assistant Teacher: Rasha Muthna Jameel

of them (if you press such a button, do so, when you move the mouse
pointer over this window, I do so ....)
Installing this language on the computer is not different from installing
any Microsoft program, where a set of helpful folders (libraries) are
installed, such as the Setup folder, the Tools folder, the Graphics folder,
and all of them are under the following path:
C: \ Program Files \ Microsoft Visual Studio \ common
Note: This path is the default path for the program.
Run the program:

After the installation process, a group of shortcuts will be added to the


startup menu, which is Microsoft Visual Basic 6.0. Inside this group, you
will find the Microsoft Visual Basic 6.0 shortcut that is responsible for
running Visual Basic.

When we run the program, the following window appears:


Lecture 1 Assistant Teacher: Rasha Muthna Jameel

Through this window, we notice the presence of three tabs:

1- New: It is used to start a new project, which is in several forms


illustrated by the icons within this tag, such as:

 Standard projects
 Dll Libraries Design Projects
 Database projects
Lecture 1 Assistant Teacher: Rasha Muthna Jameel

2- Existing tab: It is special for opening a project created from earlier,


where a dialog box appears similar to the open dialog box known within
Microsoft programs

3- Recent tab: used to display the list of projects that have been recently
worked on.
Lecture 1 Assistant Teacher: Rasha Muthna Jameel

Development environment

V.Basic language provides the tools of the greatest in the beauty


together under the name of the integrated development environment and
abbreviated IDE as it provides you with everything you need to design
windows and write code and even provide you with services such as
debugging service, managing project files, editing lists, creating and
modifying rules data.

Windows development environment:

Looking at the main window of the development environment, we notice


that it is of the Multiple Document Interface type and abbreviates MDI,
Lecture 1 Assistant Teacher: Rasha Muthna Jameel

and you will notice that it contains many windows, and the first window
we will start with is:

1- Form Designer window:

This window is the secret of the success of Visual Basic, and it is the most
famous visual window since the first releases and has an initial title,
Form1. Through this window, you perform the process of designing the
interface of your program, either by modifying its properties or placing
tools on it using the mouse.

The method of placing tools on it is similar to drawing squares as in the


paint program, and the editing operations of copying, cutting, and pasting
are supported on all the tools that you place on the window.

Tool box:

It can be said that the toolbox is one of the floating objects in the
development environment, and it is a ribbon that contains 20 standard
tools that you can add to forms (project interfaces).
Lecture 1 Assistant Teacher: Rasha Muthna Jameel

You can add other tools to this box by clicking on it with the right mouse
button and selecting the command Components. The following window
will appear:

We choose the tool you want and then click Apply or Ok. If you want to
enter Active X or Dll tools, then choose the Browse button, then choose
the tool.
Lecture 1 Assistant Teacher: Rasha Muthna Jameel

Toolbar Items:

1- Pointer, this tool returns the shape of the mouse pointer to the shape of
an arrow after it is in the form of one of the tools (but do not worry about
it, as the pointer returns to its normal position after completing the process
of placing the tool on the form)

2- Picture Box: It is a tool used to place pictures on the form and integrate
these images into the project.

3- Label: It is a tool that allows us to add addresses to the tools on the


forms.

4- Text Box: This tool is used to display or enter data into the program
such as employee name, appointment date ...

5- Frame: This frame tool is used as an incubator for tools that you want
to gain the same characteristics (inheritance property)

6- Button (button): This object is used to place buttons on the form that
are used to execute certain commands such as (save, modify, end, cancel
...)

7- List Box: This tool is used to place a list on the form containing a group
of options, which allows us to choose more than one option at the same
time.

8- Compo Box: the same tool as the previous one, but only one option that
can be used is shown.
Lecture 1 Assistant Teacher: Rasha Muthna Jameel

9- Timer: It is a tool used to execute a specific command over a specific


period of time that has one important characteristic (Interval).

10- Drive List Box: It is a list that shows the drives in the form of a list,
including the floppy and compressed drives.

11- Dir List Box: the same thing as the previous tool, but the same applies
to folders and what they contain.

12- File List Box: Same as the previous one, but for files.

13- Image: This tool is used to place images on the forms (slightly
different from the Picture Box tool.

14- Data: This tool is used for dealing with databases.

15- OlE: This tool is used to deal with objects such as Word, Excel.

16- Chek Box: A check box is used to select one or more options from a
group of options.

17- Option Button: used to select only one option from a group of options

18- The H scroll bar and V scroll bar are used to place a horizontal or
vertical scroll bar on the window, or both.

Important note:

This toolbox can be divided into a group of tabs only by clicking on it


with the right mouse button and selecting the option Add Tab, which
opens a dialog box asking for a name for this tag. We give it the name and
Lecture 1 Assistant Teacher: Rasha Muthna Jameel

then click on OK. Note that the name may be placed at the bottom of the
toolbox. Tools can be placed within this tag In the way of dragging and
dropping. To delete this mark, right click on it and then choose the
command Delete Tab. Do not fear the tools that you put in it, do not delete
it with it.

You might also like