VB 6 Simple Calculator
VB6 has outdated but our University still teaches this version .In this program we have designed a simple calculator.This VB calculator has simple operation like addition,subtraction, multiplication and division .
Design :Open VB 6. and design 3 text box ,5 buttons .Just change caption of buttons and textbox don't chabge name in the property.
VB6 Calculator |
CODE:
Private Sub
Command2_Click()
Text3.Text = Val(Text1.Text) + Val(Text2.Text)
End Sub
Private Sub Command3_Click()
Text3.Text = Val(Text1.Text) - Val(Text2.Text)
End Sub
Private Sub Command5_Click()
Text3.Text = Val(Text1.Text) * Val(Text2.Text)
End Sub
Private Sub Command6_Click()
Text3.Text = Val(Text1.Text) / Val(Text2.Text)
End Sub
Private Sub Command7_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End Sub
No comments:
Your comment will be visible after review.