HEY FRIENDS, I HAVE DESIGNED A SIMPLE CALCULATOR USING VISUAL BASIC 6.0. HERE IS CODE FOR THE SAME.
Private Sub Command1_Click()
Dim add As Integer
add = Val(Text1.Text) + Val(Text2.Text)
Text3.Text = add
End Sub
Private Sub Command2_Click()
Dim min As Integer
min = Val(Text1.Text) - Val(Text2.Text)
Text3.Text = min
End Sub
Private Sub Command3_Click()
Dim mul As Integer
mul = Val(Text1.Text) * Val(Text2.Text)
Text3.Text = mul
End Sub
Private Sub Command4_Click()
Dim div As Double
div = Val(Text1.Text) / Val(Text2.Text)
Text3.Text = div
End Sub
Private Sub Command5_Click()
End
End Sub
Private Sub Command6_Click()
Cls
Text1.Text = 'there is a ASCII character after = sign, alt+255 i.e a space character
Text2.Text =
Text3.Text =
End Sub
Private Sub Command7_Click()
yourMsg1 = MsgBox("i)Enter first number." & vbCrLf & "ii)Enter second number." & vbCrLf & "iii) Choose any airthmetic operator.", 0, "Instructions for use")
End Sub
Snapshot of Calc.exe
Download full program along with executable calculator here
No comments:
Post a Comment