Professional Documents
Culture Documents
Visual Basic Intro
Visual Basic Intro
Visual Basic 6
Announcements
Programming language
Interpreting or compiling
History of BASIC
Problem Identification
Solution Design
Coding
Compiling with compiler or running
with interpreter
Debugging
Testing
Step 4a:Compiling
Disadvantage:
Debugging is inconvenient.
Disadvantage:
Slow
Step 5: Debugging
VB is a programming language
that allows you to program in a
Windows environment
You create a Form with several
Objects
You set the properties of objects.
You write event handler to response
to users input.
VB programming
Project
Form 1
Text box
Picture box
Form 2
Form 3
Button
Button
Objects
Text box
Objects
Definitions
Objects in VB
Everything in VB is
objects, forms,
buttons,
Three elements of
objects.
Properties
Methods
Event handlers.
VB object
Properties (size,
Caption)
Methods (Print)
Event Handler
(Command1_Click())
Object: Dog
Properties
Methods
Event handlers
Important Controls
Text Boxes
Properties:
Command Button
Properties:
Name
BackColor
Style (This controls the backcolor)
Caption
Picture Boxes
Properties
Name
Picture
Methods
Definitions
Forms
properties
properties
properties
properties
Methods
properties
properties
properties
Handlers
Picture Box
properties
properties
properties
properties
properties
properties
properties
Methods
properties
properties
Command
Objects
Button
properties
properties
properties
Methods
properties
properties
Textbox
properties
properties
properties
properties
properties
properties
properties
Methods
properties
Label
properties
properties
properties
properties
properties
properties
properties
Methods
properties
properties
A: Sub Procedures
Properties
Text box
User
Message
Dispatching
Block
Methods
Event Handler
Properties
Button
Methods
Event Handler
Properties
Picture
Box
Methods
Event Handler
Making It Do Something
Events:
MouseDown
MouseUp
Click
Sub Procedure
Sub Procedure
Private Sub CommButt_Click()
Text1.FontSize = 18
Text1.BackColor = vbBlue
Command1.Caption = "Get Some Now"
End Sub
Homework