Posted: Wed May 11, 2011 1:02 pm Post subject: Calculator Help
Hey can you please tell me how to add plus Functionality to my Calculator?
VisualBASIC:
PrivateSub 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
EndSub
Sponsor Sponsor
william 01
Posted: Wed May 11, 2011 1:09 pm Post subject: Re: Calculator Help
hi pari
mirhagk
Posted: Wed May 11, 2011 1:15 pm Post subject: 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
Posted: Wed May 11, 2011 1:56 pm Post subject: Re: Calculator Help
hey can u please then help me with my Equal button becouse im writing this code but its not working
VisualBASIC:
PrivateSub cmdEqual_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdEqual.Click
num1 = Double.Parse(txtC.Text)
txtC.Text = " "
op = "=" EndSub
2goto1
Posted: Wed May 11, 2011 2:54 pm Post subject: 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?