juggernot
Well-known member
- Joined
- Sep 28, 2006
- Messages
- 173
- Programming Experience
- Beginner
I'd like to make a calculator program (yes I know every computer already has one). It's just basically so I can learn more code and become a better programmer. To make a decent calculator program is probably far beyond my skills. Could anyone help me out with this? I know how to change the text of a label when a button is pressed, but i don't know how to add on to it. Let me be more clear, If the user presses 1, than +, then 2, I need the label to show that as [1 + 2]. The simplest way to do this would be if there was code that would simply take the text in the label, and treat it as an equation.
Then I need to somehow calculate the answer. I won't be able to do this the normal way, because the textbox has two seperate values in it that I need to take into account. There is probably a way to do this but I can't figure it out.
Also, I'll probably run into difficulty when creating a question that has more parts. Example : 3-9*5+8
I realize that my original program will be missing plenty of things like Sin, Tan Cos, Brackets, etc.
Then I need to somehow calculate the answer. I won't be able to do this the normal way, because the textbox has two seperate values in it that I need to take into account. There is probably a way to do this but I can't figure it out.
Also, I'll probably run into difficulty when creating a question that has more parts. Example : 3-9*5+8
I realize that my original program will be missing plenty of things like Sin, Tan Cos, Brackets, etc.