hello .net world-
i am new to VB .Net. with that said... first project is to build a basic calculator. i have everything working the way it is supposed to work except for the minus button. when you say 1 - 2, your answer should be -1. for some reason i get 1 for my answer. the code is:
Private Sub cmdMinus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdMinus.Click
Total1 = Total1 - Val(txtDisplay.Text)
txtDisplay.Clear()
End Sub
so my question is how to get the correct answer 1 - 2 = -1?
i am new to VB .Net. with that said... first project is to build a basic calculator. i have everything working the way it is supposed to work except for the minus button. when you say 1 - 2, your answer should be -1. for some reason i get 1 for my answer. the code is:
Private Sub cmdMinus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdMinus.Click
Total1 = Total1 - Val(txtDisplay.Text)
txtDisplay.Clear()
End Sub
so my question is how to get the correct answer 1 - 2 = -1?