SummarySlideshow Chapter5
SummarySlideshow Chapter5
Windows Icons
All these are
Menus Dialog Boxes called controls
Buttons
• All programs written with Visual Basic have a Graphical
User Interface.
– So, Visual Basic is a GUI environment for writing
programs.
1
Click Start ► All
Programs.
2
Click Visual Studio
2013. 2
3
1
3
Click VS Express 2013.
A Visual Studio
screen appears.
7
5
Under Start, click New
46
Project.
6 5
Under Installed
Templates, click Visual
Basic.
9
Click OK.
8
9
Visual Basic is referred to as Integrated Development Environment
The Integrated
Environment window
(IDE) software, because all the tools required forappears
the development of a
project are available on one screen.
The Solution
The Properties
Toolbox Explorer
window.
window.
Empty Form
Solution Explorer
Property Window
Window
1 2
2
Click the pin the tab
button.
The Common
The Form willControls
move tomenu
the right
of the Toolbox will appear
side so that Toolbox and Form are
visible together.
Title bar
Menu bar
Tool bar
Toolbox
Form
• Tabs Above the Form: The tab at the top of the form
contains the word ‘[Design]’.
Displays properties
category-wise.
Displays properties
in alphabetical
order.
Properti
Events es
Methods
1
Double-click on the control 1
in the Toolbox.
2
Resize the control by
dragging one of its edges or
corners.
3
2
Under Installed 2
Templates, click Visual
Basic.
3 1
Select Windows Forms 4
Application in the middle
pane. 4
1
Click the box to the right of
1
Text in the Properties
window and type Message.
1
Click the box to the right of
BackColor. 1
2
Click the arrow and select
Highlight.
A drop-down menu
arrow will appear.
2
Type the code between the
lines Private Sub and
End Sub. • The code window will appear.
• It already has a code template.
• You will add your own code to this.
Or
Press F5.
Or 2
Click the Start 3
button on the
toolbar.
2
Click the button. A form titled Message with a single
It will display a message box stating
button
Youlabeled DisplayMessage
will return to the form.
I am working in GUI Environment
will appear on the screen
3
Click OK.
• For example:
Dim StuName As String
Dim Total As Integer
Dim Percentage As Single
• You can declare more than one variable of the same data
type like this:
• For example:
A = 100
A = B * C
6
Select FILE ► Save All to
save the VB application.
7 8
Press F5 to run the
application.
Place five label controls, Label2 Text: Enter First Name, Font: Bold, 12
four text box controls, and Label3 Text: Enter Middle Name, Font: Bold, 12
2 one button control on the
Label4 Text: Enter Last Name, Font: Bold, 12
form.
Label5 Text: Full Name, Font: Bold, 12
TextBox1
TextBox2
Set the properties given
3 here for the form and TextBox3 4
controls. TextBox4 Enabled: False
The code template
Button1 Text: Click, Font: Bold, 14
will appear.
6
Select FILE ► Save All to
save the VB application. Sohail
7
Press F5 to run the 8
application.
8
Enter your First Name,
The information will
Middle Name, and Last appear in the Full
Name in the respective text Name text box.
box and click the Click
button.
©Oxford University Press Introduction to Visual Basic 49
Fill in the blanks
1. IDE
The __________ window contains all the tools for the development of a
project on one screen.
3. property
The ______________ is a named attribute of a control.
2. False
The Toolbox tab appears on the right side of the screen: ________
False
4. The Event driven programming is sequential: ________
5. The / operator always gives you the result as whole number: ________
False