
-----------------------------------
pari
Wed May 11, 2011 1:02 pm

Calculator Help
-----------------------------------
Hey can you please tell me how to add plus  Functionality to my Calculator?


    Private Sub cmdPlus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdPlus.Click
        num1 = txtC.Text
        havenum = True
        txtC.Text = " "
        'txtC.Text = num1 + num2




    End Sub


-----------------------------------
william 01
Wed May 11, 2011 1:09 pm

Re: Calculator Help
-----------------------------------
hi pari

-----------------------------------
mirhagk
Wed May 11, 2011 1:15 pm

RE:Calculator Help
-----------------------------------
it looks like your adding strings, not 100% sure if you are or not but if you are then you need to convert to an integer (or something else that stores a number)

-----------------------------------
pari
Wed May 11, 2011 1:56 pm

Re: Calculator Help
-----------------------------------
hey can u please then help me with my  Equal button becouse im writing this code but its not working

Private Sub cmdEqual_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdEqual.Click
        num1 = Double.Parse(txtC.Text)
        txtC.Text = " "
        op = "="
    End Sub


-----------------------------------
2goto1
Wed May 11, 2011 2:54 pm

RE:Calculator Help
-----------------------------------
Is there an error message? If so, what is the error message? 

Or are you expecting the equal button to do something when clicked that it's not at this time?
