Hi people, new to this site, and the vb language. I have been working on a four function calculator and I have not gotten it to work out the calculations. I can't get the right code for the equals button, but even after that I don't know the code for each individual arithmetic operator (+,-,*,/). So far I have just worked on the plus Button. Here is my code, any help would be appreciated. I omitted buttons 1-9 (same as 0) and the operations that I haven't worked on yet.
CODE
Public Class Form1
Inherits System.Windows.Forms.Form
Dim total1 As Integer
Dim total2 As Integer
Private Sub btn0_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn0.Click
txtDisplay.Text = txtDisplay.Text & btn0.Text
End Sub
'Addition Button
Private Sub cmdPlus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdPlus.Click
total1 = txtDisplay.Text 'Textbox entry stored in variable total1
total1 = total1 + Val(txtDisplay.Text) 'Variable total1 contains number in total1 plus the number in the textbox
txtDisplay.Clear()
End Sub
'Equals Button
Private Sub cmdEquals_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdEquals.Click
total2 = total1 + Val(txtDisplay.Text)
total2 = total2 + total1
End Sub
'Clear Button
Private Sub cmdClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdClear.Click
txtDisplay.Clear()
End Sub
End Class