0% found this document useful (0 votes)
2 views

Lesson 1 Visual Basic

Visual Basic 6.0 is an event-driven programming language and IDE developed by Microsoft, allowing users to create Windows applications through a drag-and-drop interface. It has evolved from BASIC and includes various editions tailored for different user needs, such as Learning, Professional, and Enterprise editions. The document also outlines the features, advantages, and components of the Visual Basic IDE, including project management and coding capabilities.

Uploaded by

clarito Baluyot
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Lesson 1 Visual Basic

Visual Basic 6.0 is an event-driven programming language and IDE developed by Microsoft, allowing users to create Windows applications through a drag-and-drop interface. It has evolved from BASIC and includes various editions tailored for different user needs, such as Learning, Professional, and Enterprise editions. The document also outlines the features, advantages, and components of the Visual Basic IDE, including project management and coding capabilities.

Uploaded by

clarito Baluyot
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 34

LESSON 1: INTRODUCTION TO

INTRODUCTION TO VISUAL BASIC 6.0


 What is Visual Basic?
Visual Basic is a third-generation event-driven
programming language and Integrated Development
Programming (IDE) first released by Microsoft in
1991 for its COM Programming Model . It evolved
from the earlier DOS version called
BASIC. BASIC means :-
Beginners' All-
purpose Symbolic Instruction Code. Since then
Microsoft has released many versions of Visual
Basic, from Visual Basic 1.0 to the final version
VB AS PROGRAMMING
LANGUAGE
Visual Basic is a Programming tool that allows user to
develop Windows or GUI ( Graphical User Interface )
applications. It means that rather than writing numerous line
for code to describe the appearance and location for interface
elements like C , C + + or Basic.

User can simply drag and drop pre-built objects into the
form window on computer screen.VB is a much enhanced
version of BASIC programming language ( BASIC is
Predecessor of VB ). The main difference is that the VB can
create windows programs by just Drag & Drop where as
BASIC could only create DOS programs or work only in CUI 3

(Command User Interface ).


HISTORY OF VISUAL
BASIC
• Alan Cooper developed Visual Basic in 1988
and sold to Microsoft
• VB1 Debuts at Windows World in March
20,1991
• VB2 Debuts in November 1992
• VB3 Debuts in June 1993
• VB4 Debuts in October 1996
• VB5 Debuts in April 1997
• VB6 Debuts in October 1998
THREE EDITIONS OF VISUAL
BASIC
1. THE VISUAL BASIC LEARNING EDITION IS THE
INTRODUCTORY EDITION THAT LETS YOU EASILY CREATE
WINDOWS APPLICATIONS.
2. THE VISUAL BASIC PROFESSIONAL EDITION IS FOR
COMPUTER PROFESSIONALS AND HAS FEATURES SUCH AS
TOOLS TO DEVELOP ACTIVEX AND INTERNET CONTROLS.
3. THE VISUAL BASIC ENTERPRISE EDITION IS THE MOST
ADVANCED EDITION AND IS AIMED TO PROGRAMMERS WHO
BUILD DISTRIBUTED APPLICATIONS IN A TEAM
ENVIRONMENT.
TYPES OF APPLICATIONS CREATED
IN VB 6.0
1. STANDARD EXE
2. ACTIVEX EXE, ACTIVEX DLL
3. ACTIVEX CONTROL
4. VB APPLICATION WIZARD ,VB WIZARD MANAGER
5. ACTIVEX DOCUMENT EXE, ACTIVEX DOCUMENT DLL
6. ADDIN
7. DATA PROJECT
8. DHTML APPLICATION
9. IIS APPLICATION
10.VB ENTERPRISE EDITION CONTROLS
FEATURES OF VISUAL
BASIC
1. IT IS A SIMPLE LANGUAGE.
2. IT SUPPORTS INTEGRATED DEVELOPMENT ENVIRONMENT(IDE), AS MULTIPLE
PROJECTS CAN BE OPENED.
3. THE LINES OF CODES ARE COMPILED AUTOMATICALLY WITH A FASTER
COMPILER.
4. IT COMPLETES THE WORD AUTOMATICALLY.
5. BOOKMARKS CAN BE PLACED FOR QUICK SEARCH.
6. BREAK POINTS CAN BE TOGGLED EASILY.
7. DRAG AND DROP FACILITY CLIPBOARD AND PRINTER ACCESS.
8. HANDLE FIXED AND DYNAMIC VARIABLE AND CONTROL ARRAYS.
9. SEQUENTIAL RANDOM ACCESS FILE, AND BINARY ACCESS FILE SUPPORT.
ADVANTAGES OF VISUAL
BASIC
A. THE STRUCTURE OF THE BASIC PROGRAMMING LANGUAGE IS VERY SIMPLE,
PARTICULARLY AS TO THE EXECUTABLE CODE.
B. VB IS NOT ONLY A LANGUAGE BUT PRIMARILY AN INTEGRATED, INTERACTIVE
DEVELOPMENT ENVIRONMENT ("IDE").
C. THE VB-IDE HAS BEEN HIGHLY OPTIMIZED TO SUPPORT RAPID APPLICATION
DEVELOPMENT ("RAD"). IT IS PARTICULARLY EASY TO DEVELOP GRAPHICAL USER
INTERFACES AND TO CONNECT THEM TO HANDLER FUNCTIONS PROVIDED BY
THE APPLICATION.
D. THE GRAPHICAL USER INTERFACE OF THE VB-IDE PROVIDES INTUITIVELY
APPEALING VIEWS FOR THE MANAGEMENT OF THE PROGRAM STRUCTURE IN THE
LARGE AND THE VARIOUS TYPES OF ENTITIES (CLASSES, MODULES,
PROCEDURES, FORMS).
E. VB IS ATTUNED TO MICROSOFT’S COMPUTER OBJECT MODEL(“COM”).
LESSON 2: STARTING VISUAL
BASIC 6.0
INTERFACE OF VISUAL BASIC

When user start the window it display a screen having


certain option. With the help of this screen user can
select the type of project user want to make.

Visual Basic environment is platform provided by VB


to develop and execute a project . This environment
consist of different platforms or control tools and
various other options.
10
INTERFACE OF VISUAL
BASIC

11

The Visual Basic startup dialog box


VISUAL BASIC IDE

When user choose any application


platform, like any other window
application, VB consists of multiple
window, which appear at start up. The
windows that are display when user
start VB are collectively Known as
Visual basic Integrated
12

Development Environment ( IDE ).


VISUAL BASIC IDE
Title bar
Menu bar
Toolbar

Project
Window

Form Properties
Window Window
Toolbox

Form
Layout
Window

Visual Basic Integrated Development Environment


1. Title Bar - The top of the window with the name of
the project.
2. The Menu Bar - Displays the commands required to
build an application.
3. The Tool Bars - Provides shortcut icons for quick
access to the commonly used commands.
4. PROPERTIES
WINDOW
The Properties window let user to
change the characteristics, or property
settings, of the form itself and of visual
interface elements on the form. The
Properties window consists of two
columns: the first is the name of the
property, which user cannot change; the
second column, which is the property
setting that user can change. Any
Change in the property of the object will
affect the object on the form.
15
5. TOOL
BOX
The toolbox consists of the
various objects that user will
use to design the application.
These objects, called
controls, are objects that
user see in all standard Win
applications, such as
textboxes, command
buttons, option (radio)
buttons, checkboxes, etc. 16
6. FORM
WINDOW
The Form window is the
central area where user
can draw application.
The forms are windows
which holds control like
Button , Checkbox etc
which make user
application. The large
area of form is called
client area for working
with different controls.
17
7. SOURCE CODE WINDOW

The Source Code window is


where user type the code
which VB execute. It has
two parts Control Box ,
Event Box .The Heading of
window indicate which
event the code is
associated . It is a window
where user write most of
the code . 18
7. SOURCE CODE WINDOW

It shows the control Box


which contains two
controls ( Command 1 &
Form ).

19
7. SOURCE CODE
WINDOW

It shows the Event


Box that Selected
Control can perform
these event.

20
OPENING , SAVING &
RUNNING
Opening a Project : - To open a VB project , invoke VB6
shortcut on the Desktop or going through the pull-up menu
select VB program .
Start  Program  Microsoft Visual Basic 6.0 .

Saving a Project : - After creating a Project , user need to


save it . For
this click File menu and select save project. Then system
asks : -
1. Provide a name for Form File ( . frm )
21
2. After that Provide a name for Project file ( .vbp )
OPENING , SAVING &
RUNNING
Running a Project : - After saving the project , the next step is
to
execute the program. Following are different ways to execute a
project.

1. Press F5 Key
2. On Menu Bar Click Run - Start
3.On VB Toolbar , Click Run Icon.
WHILE YOUR PROJECT IS RUNNING, THE USER CAN DO MANY
THINGS, SUCH AS MOVE MOUSE AROUND; CLICK ON EITHER
BUTTON; MOVE, RESIZE OR CLOSE YOUR FORM’S WINDOW; OR
JUMP TO ANOTHER APPLICATION. EACH ACTION BY THE USER
CAUSES AN EVENT TO OCCUR IN YOUR VISUAL BASIC PROJECT.
VB IGNORES EVENTS FOR WHICH NO PROCEDURES ARE
WRITTEN. VISUAL BASIC AUTOMATICALLY NAMES YOUR EVENT
PROCEDURES. THE NAME CONSIST OF THE OBJECT NAME, AN
UNDERSCORE(_), AND THE NAME OF EVENT. FOR EXAMPLE:
THE CLICK EVENT OF COMMAND BUTTON CALLED CMDPUSH
KEYBOARD
MOUSE EVENTS
EVENTS

FOCUS EVENTS
NU

NG
ME
RIC

RI
ST
OB
JEC
Data types T
TE
BY

T supported

DA
AN

TE
RI
VA

BOOLEAN
VARIABLES
DECLARING VARIABLES
IMPLICIT
DECLARARTION

EXPLICIT
DECLARATIO
N

USING OPTION
EXPLICIT
STATEMENT
SCOPE OF VARIABLES

MODULE
LOCAL
GLOBAL LEVEL
VARIABL
VARIAB VARIABL
E
LE E
CONSTANTS

SYSTEM
USER
DEFINED
DEFINED
CONSTANTS
CONSTATNT
(PREDEFINED
S
)
OPERATORS
ARITHMETIC OPERATORS
RELATIONAL OPERATORS
LOGICAL OPERATORS
TYPE CONVERSIONS

You might also like