;););)
![]() |
;););)
Drop buttons onto a form. Label them "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "=", "+", "-", "/", "*", ".", "C" and "CE". Optionally you can add special functions like "±" or "1/x" or "%".
Drop a textbox on the same form. This will be the visible "accumulator".
Create a handler for each of the numeral keys. If you create a "control array", you can create one handler to handle each of the keys. The handler will decide what key was pressed. It will add that numeral to the visible accumulator.
Create a handler for each of the four function keys and for the "=". The function key will perform the function +, -, /, *, on the value that is in the visible accumulator with an invisible accumulator.
For the project to succeed, you need to figure out what "states" the program is in. For example, the following states might be considered
1. A number is being accumulated in the visible accumulator. Nothing is in the invisible accumulator.
2. A number has been placed in the invisible accumulator and a second number is being placed into the visible accumulator.
There are other, more subtle states. You need to identify each of them.
Open up the CALCULATOR program that comes with Windows. Figure out how that must work. That will give you ideas on how to make the calculator work.
I won't write the program for you. I've done that for a living and they paid me a lot of money for doing it so if you wanted me to write code for you, you'd have to pay me lots of money and I would have to agree to accept it (which I won't). However, I will give you hints and I'll help you out, in some cases, with subroutines. (Click the "Go Advanced" button when you're responding. You can attach a zip file containing the VB6 code).
Please show me or send me the code and form with controls for a calculator in vb 6.0 vershion.
Like I said, "you'd have to pay me lots of money and I would have to agree to accept it." You do the dropping of things on a form and post the code. I'll critique it and reply with suggestions.Quote:
I won't write the program for you. I've done that for a living and they paid me a lot of money for doing it so if you wanted me to write code for you, you'd have to pay me lots of money and I would have to agree to accept it (which I won't). However, I will give you hints and I'll help you out, in some cases, with subroutines.
I want to all detail for simple calculator
All times are GMT -7. The time now is 01:31 AM. |