Está en la página 1de 34

Visual Basic 6.

0
An Introduction
What is Programming
Language?
What is the Requirement
of Programming
Language?
Requirement of Programming Language
Programming Language is used to create a
Computer Program.

A Computer Program is a collection of logically
related statements and expression to solve a
particular problem.

A Computer Program is used to instruct the
computer to perform the particular task.
Types of Programming Language
Programming
Language
POP
Language
OOP
Language
OBP
Language
POP Language:- An Introduction
Procedure Oriented Programming Language

Based on Function/Procedure

Primary Focus on Creation of Function to
solve a particular Problem

Ex:- C Language

OOP Language:- An Introduction
Object Oriented Programming Language

Based on Object

Primary Focus on Creation of Object to solve a
particular Problem

Ex:- Java/C++ Language

OBP Language:- An Introduction
Object Based Programming Language

Based on Object and Class

Primary Focus on Using Built-in Object to
solve a particular Problem

Ex:- Visual Basic Language

Introduction
Superset of Basic Language
Visual basic is derived from the BASIC
language which is CUI oriented.

Therefore VB supports the some construct of
BASIC language.

Like the BASIC programming language, Visual
Basic was designed to be easy to learn and
use.
Drag and Drop
Program are Designed / created using drag-
and-drop techniques.

A tool is used to place controls (e.g., text
boxes, buttons, etc.) on the form.

RAD
It stands for rapid application development.

Visual Basic provides built-in controls such as
button, textbox, combo box etc that allow the
user to develop their application as soon as
possible.
Event Driven
The actions which are performed by a user is called
event such as mouse click, key press and click a button.

In the POP/OOPs language the compiler/OS control and
determine the sequence of execution of the program
but in event driven programming language the
compiler/OS do not control and determine the
sequence of execution.

The VB program waits for the user action. Each user
action can cause an event to occur which execute VB
code associate with it.
GUI Application Development
A graphical user interface or GUI is a type of
user interface which allows people to interact
with a computer and computer-controlled
devices with the help of small images.

It presents graphical icons, visual indicators or
special graphical elements called object or
controls.
Object Based Programming language
Visual Basic is an Object based programming
language. In object based programming
language all the operation/task is handled
with the help of control/object.

These controls have the properties, events
and methods which help the user in creating
dynamic applications.
Database Support
The primary objective of Visual Basic is to
develop Windows applications that interface
with database systems such as MS Access, SQL
Server and Oracle etc.

Visual Basic provides data control, Data Access
Object (DAO), Remote Data Objects (RDO), or
ActiveX Data Objects (ADO) to connect with
database.
RollNo Name
1001 A
1002 B
1003 C
1001
Database
Server
Client
Support for Report
Report allows the user print the data stored into the
database.

Visual basic allows the user to create static & dynamic
data reports.

Visual basic provides the built in support for reports.
These reports are called data Reports.

We can also include the Crystal Reports in Visual Basic
application.
ActiveX supports
ActiveX allow the user to create custom
controls according to their requirements.

ActiveX controls are small program building
blocks that can be used to create distributed
applications.

These types of application works over the
Internet through web browsers.
Windows API Supports
The Windows API is Microsoft's core set of application
programming interfaces (APIs) available in the
Microsoft Windows operating systems.

Win API Provide access to the fundamental resources
available to a Windows system. Included are things like
file systems, devices, processes and threads.

It Provide access to functionality that is an addition on
the kernel such as Windows registry, shutdown/restart
the system, start/stop/create a Windows service,
manage user accounts etc.


Object/Control: - An Introduction
A Small Graphical Element which is used to
create/ design a Visual Basic Program is called
as Control or Object.

They allow the user to create graphical user
interface based applications.

Object/Control: - An Introduction
Controls are created using drag-and-drop
techniques. A tool is used to place controls
such as text boxes, buttons, etc. on the form
window.
Types of Controls in VB
Pointer
Label
Textbox
Command Button
Checkbox
Option Button
List box
Combo Box
Picture Box
Image

Drive List Box
Directory List Box
File List Box
Timer
OLE
Shape
Line
Horizontal Scroll Bar
Vertical Scroll Bar
Frame
Data Control

Object/Control: - An Introduction
All the objects have the following three
things:-
a). Property
b). Method
c). Event

Property : - An Introduction
Property is used to customize the control & change the appearance
of the controls.

Every control has a number of properties. Some properties are
common to all control while some properties are specific to the
control.

The following are the some common properties:-
Name
Backcolor
Forecolor
Height
Width
Font

Property : - An Introduction

We can change the property values using two
methods.
Using Property Window
Using Code Window

We can change some of the properties using the
property window it is called as Design Time Property.

We can also change the properties using the code then
it is called as Run Time Property.

Methods: - An Introduction
The collection of statement and expression which
are refer by using a name is called as
Method/Function in Visual Basic.

When we call a Method/Function, all the
statement or expression are executed.

Methods are used to perform a particular task or
operation such as draw a circle, draw a Line, draw
a point etc.
Types of Methods: - An Introduction
Predefined Methods: - The methods which
are provided by the Visual basic is called as
Predefined Methods. Every Control has its
own methods.

User Defined Method: - The Methods which
are created by the user is called the User
Defined Method.



Event: - An Introduction
The actions which are performed by a user
using the mouse and keyboard is called event.
Moving the Mouse
Mouse click
Pressing a Key
Releasing the Key
Click and Drag
Types of Event: - An Introduction
Every control has a number of events. Some
events are common to all control while some
events are specific to the control.

Generally we can classify the events into the
following four categories in VB
General Event
Mouse Related Event
Keyboard Related Event
Other Events




Project: - An Introduction
A Program in a Visual Basic Language is called
as a Project.

When we create a project, Visual Basic
automatically create different types of file
automatically.



Project: - An Introduction
A Visual Basic Project contains the following
types of files




File Name Extension
Project File .VBP
Form File .Frm
Workspace File
Source Safe File
IDE: - An Introduction