View
1.447
Download
0
Category
Preview:
Citation preview
VISUAL BASIC PROGRAMMING
Introduction to
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.
History and Development
• Visual Basic (VB) was evolved from BASIC.
• BASIC, developed in 1964 by Prof. John Kemeny and Thomas Kurtz of Darmonth College.
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
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.
History and Development
TYPES OF PROGRAMMING
Visual Basic is a distinctly different language from BASIC. It provides powerful features such as graphical user interface (GUI) event handling, access to Win32 API (Application Programming Interface), 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.
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: “; LInput “Enter Width: “;W A = L * WPrint “The area is “; A “sq. units.”end
TYPES OF PROGRAMMING
B. Event Programming or Visual Programming – a method of programming using a programming environment or language 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.)
Sample of Event Programming
PROGRAM OUTPUT
Visual Basic Program Development CycleDeveloping a ProgramWriting 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
Visual Basic Program Development Cycle1. 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 SlipData needed: Employee number, department, employee
name, basic pay, allowances, deductions and net pay.
Visual Basic Program Development Cycle2. 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 DepartmentFirst Name Last Name
Basic Salary Deductions
Allowances Net Pay
Visual Basic Program Development Cycle3 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:
Visual Basic Program Development Cycle4. Enhance your design. – define the name, color, size and
appearance or each user interface object. (an Object’s characteristics are its properties)
Example:
Visual Basic Program Development Cycle5. Write your codes. Write instructions in BASIC to make each part of your
program do something . (Your BASIC Instructions are the commands or codes.)
Visual Basic Program Development Cycle6. Test your program Run your program to see if it works.
Visual Basic Program Development Cycle7. 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.
END OF PRESENTATION
TransitionalPage
Backdrops:- These are full sized backdrops, just scale them up!
- Can be Copy-Pasted out of Templates for use anywhere!
www.animationfactory.com
Recommended