i know it was due yesterday, but ill tell you anyway
declare two variables globally, they will be your first and second number that the user will put in
then, the user will put in a number, and press a button that says firstvalue or something. when the user presses that button, you will code it to firstNumber=val(me.txtWhatever.text) the user will then press /*-+, and the txtbox will clear, and when the user puts in a second number, they will click another button that will do the same thing as the firstvalue button but for the second value. then your program will calculate it, and give the answer in a label.
that was probably really confusing, so ima create a program real quick, and paste the code in a few mins
Public Class frmCalculator
Dim firstValue As Double
Dim secondValue As Double
Dim answer As Double
Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
Me.Close()
End Sub
Private Sub btnDone_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDone.Click
If firstValue = Nothing Then
firstValue = Val(Me.txtValue.Text)
Me.txtValue.Text = Nothing
Else
secondValue = Val(Me.txtValue.Text)
Me.txtValue.Text = Nothing
End If
End Sub
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
answer = firstValue + secondValue
Me.lblAnswer.Text = answer
firstValue = Nothing
secondValue = Nothing
End Sub
Private Sub btnSubtract_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubtract.Click
answer = firstValue - secondValue
Me.lblAnswer.Text = answer
firstValue = Nothing
secondValue = Nothing
End Sub
Private Sub btnMultiply_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMultiply.Click
answer = firstValue * secondValue
Me.lblAnswer.Text = answer
firstValue = Nothing
secondValue = Nothing
End Sub
Private Sub btnDivide_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDivide.Click
answer = firstValue / secondValue
Me.lblAnswer.Text = answer
firstValue = Nothing
secondValue = Nothing
End Sub
End Class