Ask Experts Questions for FREE Help !
Ask
    emcee2nd's Avatar
    emcee2nd Posts: 1, Reputation: 1
    New Member
     
    #1

    Jun 30, 2009, 07:26 PM
    How to make a calculator in Visual Basic 6.0
    ;););)
    Perito's Avatar
    Perito Posts: 3,139, Reputation: 150
    Ultra Member
     
    #2

    Jun 30, 2009, 08:06 PM

    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).
    anoopdaspr's Avatar
    anoopdaspr Posts: 1, Reputation: 1
    New Member
     
    #3

    Dec 3, 2009, 08:50 AM
    Please show me or send me the code and form with controls for a calculator in vb 6.0 vershion.
    Perito's Avatar
    Perito Posts: 3,139, Reputation: 150
    Ultra Member
     
    #4

    Dec 4, 2009, 07:56 AM
    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.
    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.
    RubaRaj's Avatar
    RubaRaj Posts: 2, Reputation: 1
    New Member
     
    #5

    Feb 15, 2011, 10:59 PM
    I want to all detail for simple calculator

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Visual basic code for calculator [ 8 Answers ]

I am a student at college in somaliland. One of my instructors told me to write a small programme for a calculator in visual basic 6.0. so, I'm stuck with this. Help me with the codes.

Basic calculator [ 1 Answers ]

Mr Perito thanks for taking time to help me.:):) 1 + 1 + 1 + 1 This the appearance of my calculator and how should it works 1. What I want to do is when I enter the first number it will be displayed on the Number 1 textbox. 2. press + to add the two number 3. when I enter the second...

How to make a calculator in visual basic 6 [ 1 Answers ]

How to make a calculator in visual basic 6, what are the codes for it?

How to make the users accounts using Visual basic 6.0 [ 1 Answers ]

I am writing a program using Visual Basic 6.0. In my project, I would like to have the users identify themselves as the authorized users i.e. there is an administrators account and the guest account like it is in windows XP. Using the Visual basic progam, can someone give me tips and even codes on...

Make a till in Visual Basic 6.0 [ 2 Answers ]

Hai, my name is raken, well lets to the point: Create an application that all stimulate a till. The application should allow a user to enter an item and the quantity purchased. Item description and cost should be read from a file or database. There should be a display showing the items...


View more questions Search