Professional Documents
Culture Documents
VB2 Revision - Creating Applications With VB
VB2 Revision - Creating Applications With VB
VB2 Revision - Creating Applications With VB
Slide 2- 2
2.1
Visualize and
Design the User Interface
Control Type
Control Name
Description
Form
Form1
A small form that will serve as
(Default Name) the window onto which the other
controls will be placed
Label
Label1
Displays the message
(Default Name) "Directions to the Highlander
Hotel"
PictureBox
PictureBox1
Displays the graphic image
(Default Name) showing the map to the hotel
Slide 2- 5
Define
Control Relevant Property Values
Slide 2- 6
Form
Name: Form1
Text: "Directions"
Label
Name: Label1
Text: "Directions to the Highlander Hotel"
TextAlign: MiddleCenter
Font: Microsoft sans serif, bold, 18 point
PictureBox
Name: PictureBox1
Picture: HotelMap.jpg
SizeMode: StretchImage
Slide 2- 7
Slide 2- 9
Slide 2- 10
Properties Window
2.2
Responding to Events
Controls to be Added
Control Type
Control Name
Description
Label
lblDirections
Button
btnDisplayDirections
Button
btnExit
Slide 2- 13
Control Properties
Slide 2- 14
Method btnDisplayDirections_Click
Marks the beginning of this event procedure
Label:
Name: lblDirections
Text: "Traveling on I-89, take
Visible: False
Button:
Name: btnDisplayDirections
Text: "Display Directions
Button:
Name: btnExit
Text: "Exit"
Slide 2- 16
Then a dot
Then the PropertyName (Visible)
For example:
lblDirections.Visible
Slide 2- 17
Slide 2- 18
Method btnExit_Click
Marks the beginning of this event procedure
Name of the control that owns the event procedure
Name of the event the procedure responds to
Line Continuation Mark
Slide 2- 20
Additional Properties
2.3
Slide 2- 21
Slide 2- 23
Slide 2- 24
2.4
Slide 2- 26
Slide 2- 27
Slide 2- 28
PictureBox Control
2.5
Clickable Images
2.6
Slide 2- 31
Slide 2- 33
Slide 2- 34
2.7
Slide 2- 37
Slide 2- 38
10