You are on page 1of 2

 First we select the Standard exe item in the view

project dialog box,


opening Visual
Basic itself.
 Then we select the Textbox from the Toolbox and make
a textbox on the form.
 Then we select the command button from the tool box
from the tool box we make buttons 0, 1, 2, 3, 4 … 9, +,
=,-,*, /, clear.
 After these all buttons are made. Then we need the
buttons to be coded. Thus double click on the button
numbered “1”, following coding is done

Private sub Command 12-Click ()


a= Text 1. Text
Text1.Text = ”+”
d=1
End Sub
 Double clicking on the Button “-”
Private sub Command 13-Click ()
a= Text 1. Text
Text1.Text =”-”
d=3
End Sub
 Double clicking on the Button “*”
Private sub Command 14-Click ()
a= Text 1. Text
Text1.Text =”*”

d=3
End Sub
 Double clicking on the Button “/”
Private sub Command 15-Click ()
a= Text 1. Text
Text1.Text =”/”
d=4
End Sub
 Double clicking on the Button “Square”
Private sub Command 16-Click ()
a= Text 1. Text
Text1.Text =”*”
C=a*a
Text1.Text = c
End Sub

 Double clicking on the Button “Factorial”


Private sub Command 17-Click ()
a= Text 1. Text
Text1.Text =”i”
e=1
for i = s to step-1
e = e*i
Text1.Text = e
End Sub
 Double clicking on the Button “Clear”
Private sub Command 18-Click ()
Text1.Text ( )
End Sub
 Double clicking on the Button “=”
Private sub Command 19-Click ()

b = Text1.Text
Select case d%
Case 1: c= a + b
Text1.Text = c
Case 2: c = a - b
Text1.Text=c
Case 3: c= a * b
Text1.Text = c
Case 4: c= a / b
Text1.Text = c
End Select
End Sub

You might also like