Visual Basic Unit-I
Visual Basic Unit-I
(AUTONOMOUS)
ERODE 638 107
DEPARTMENT OF
BUSINESS
ADMINISTARTION WITH
COMPUTER APPLICATIONS
UNIT-I
• Introduction to Visual Basic
• Event and Event procedure
• Object Related Concepts
• Visual Basic Program Concepts
• Visual Basic Environment
• Visual Basic Fundamentals
Introduction to Visual Basic
• Visual basic is an object oriented program
• It is the third generation language
• It is the programming language
• It runs under MS Window Environment
• It consist of two major Components
1)Controls
2)Commands
Introduction to Visual Basic
• An extensive collection of pre written tools
is called controls
Eg: label box, text box etc.,
• A complete set of program is called
commands
• The overall approach of visual basic
program is under two steps
– Create an user interface
– Add a group of basic instruction commands
Visual Basic Screen
Visual Basic Screen
Visual Basic Screen
Event and Event Procedure
Event
• Visual basic is an event driven
programming
• The program responses to the action
taken by the user.
• In VB, controls (like buttons, text boxes,
etc.) can generate events.
Event and Event Procedure
Common types of events
Click
• Triggered when a user clicks a control, like
a button.
TextChanged
• Triggered when the text in a text box
changes.
Load
• Triggered when a form is loaded.
Event and Event Procedure
Event Procedure
• The group of basic commands which bring
about responses is called as event
procedure.
Example
Private Sub Command1_Click()
....
End Sub
Event and Event Procedure
• In this example, Command1_Click is an
event procedure that handles the Click
event of Command1.
• When Command1 is clicked, the code
within the Command1_Click procedure
executes.
Event and Event Procedure
Example Program
Write and explain your practical program
Object Related Concepts
• There are five different things in the object
related concepts
1)Forms
2)Controls
3)Objects
4)Properties
5)Methods
Forms