Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Calculator Help
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
pari




PostPosted: 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:

    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
Sponsor
Sponsor
Sponsor
sponsor
william 01




PostPosted: Wed May 11, 2011 1:09 pm   Post subject: Re: Calculator Help

hi pari
mirhagk




PostPosted: 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




PostPosted: 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:

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




PostPosted: 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?
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: