7. Microsoft Visual Basic
• Is a trademark name owned by
Microsoft Corporation for a high-
level, visual programming version
of the BASIC.
• It was designed for building
windows-based applications. As
long as you are familiar with the
windows environment, you can
easily learn and create your own
application.
8. History and Development
• Visual Basic (VB) was evolved from
BASIC.
• BASIC, developed in 1964 by Prof. John
Kemeny and Thomas Kurtz of Darmonth
College.
9. History and Development
• With the development of the Microsoft
windows graphical user interface in the
late 80’s and early 90’s, the natural
evolution of BASIC to VB was begun by
Microsoft Corporation in 1991
10. History and Development
• Until VB appeared, developing Microsoft
windows-based applications was a
difficult and cumbersome process. VB
simplifies windows application
development. Since 1991, six versions
of VB have been release with the latest
VB 2012.
12. TYPES OF PROGRAMMING
Visual Basic is a distinctly different
language from BASIC. It provides
powerful features such as graphical user
interface (GUI) event handling, object
oriented features, error handling,
structured programming, and much more.
In order to understand the application
development process, it is helpful to
understand first some of the key concepts
upon which VB is built.
13. TYPES OF PROGRAMMING
A. Textual Programming – A way to create a
program wherein you write a code using the
syntax of a particular language. A text based
program is developed by a procedural language.
The most widely used are C, Pascal, BASIC,
FORTRAN, COBOL.
Sample:
Rem This program computes for the area of a rectangular figure.
Input “Enter Length: “; L
Input “Enter Width: “;W
A = L * W
Print “The area is “; A “sq. units.”
end
14. TYPES OF PROGRAMMING
B. Event Programming or Visual Programming – a
method of programming with the use of a
programming environment in which basic
program components can be selected through
menu choices, buttons, icons and other
predetermined methods. In creating programs,
the icons used represent common programming
routines.
EVENT here is defined as an action or
occurrence, often generated by the user, to
which a program might respond. (ex. Key
presses, button clicks, or mouse movements.)
16. Visual Basic Program Development
Cycle
Developing a Program
Writing a VB program requires a few steps. Have a concrete
plan on what you are going to do, design an interface for
it, and write a program to achieve it. Below are the steps
in developing a VB Program. These steps are what we
call the program development cycle.
1. Define what you want the computer to do.
2. Decide how your program will look on the
screen.
3. Design what you planned.
4. Enhance your design.
5. Write your codes.
6. Test your program.
7. Edit, if necessary
17. Visual Basic Program Development
Cycle
1. Define what you want the computer to do.
If you have a concrete idea as to what you are planning
to do, it will be easier for you to start one by writing all
the needed requirements (paper and pencil).
Example:
Purpose or Project: To design an Employee’s Pay Slip
Data needed: Employee number, department, employee
name, basic pay, allowances, deductions and net pay.
18. Visual Basic Program Development
Cycle
2. Decide how your program will look on the screen.
Similar to a designer, you start working on your canvass,
having your first sketches. You may start working with a
paper and pencil or you may put your design directly to
VB. Planning the design of your program is one of the
most exciting part in VB. The look of your program is
what we call USER INTERFACE
Example: GLOBAL NETWORK INC.
Employee’s Pay Slip
Employee Number Department
First Name Last Name
Basic Salary Deductions
Allowances Net Pay
19. Visual Basic Program Development
Cycle
3 Design what you planned. –
Draw the user interface using common parts such as
windows, menus and command buttons. In VB, you will
be working on your FORM, plan where to start your
design. (The parts of a user interface are called Objects
or Controls.)
Example:
20. Visual Basic Program Development
Cycle
4. Enhance your design. – define the name, color, size and
appearance or each user interface object. (an Object’s
characteristics are its properties)
Example:
21. Visual Basic Program Development
Cycle
5. Write your codes.
Write instructions in BASIC to make each part of your
program do something . (Your BASIC Instructions are
the commands or codes.)
22. Visual Basic Program Development
Cycle
6. Test your program
Run your program to see if it works.
23. Visual Basic Program Development
Cycle
7. Edit, if necessary
If you want to make changes in the interface design,
just restructure it. If there is a problem with the codes,
fix any errors (or bugs) in your program.
25. Visual Basic Integrated
Development Environment (IDE)
The IDE is a set of
integrated tools for
developing software.
The VB IDE allows the
programmer to create, run,
and debug VB programs
conveniently and quickly.
This method is called RAD
(Rapid Application
Development)
27. Test Yourself: Complete the following
acronym
I.
1. RAD : _______________________
2. VB : _______________________
3. BASIC: _______________________
4. IDE : _______________________
5. GUI : _______________________
II.
Enumerate the Visual Basic Program Development Cycle.
1.
2.
3.
4.
5.
6.
7.
28. Test Yourself:
Give three examples of an Event:
1.
2.
3.
III.
Differentiate Textual Programming from Event
Programming (5 pts)
____________________________________________
____________________________________________
____________________________________________