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

    Jun 27, 2009, 07:49 PM
    16 Buttons for calculator with coding
    I need a help because I have an project with visual basic

    Calculator with 16 buttons but I don't know what to do with this one project?

    So please help me?

    Thank you very much!

    :confused:
    Perito's Avatar
    Perito Posts: 3,139, Reputation: 150
    Ultra Member
     
    #2

    Jun 27, 2009, 08:03 PM

    Drop 16 buttons on a calculator and label those buttons. If you're using Visual Basic (as opposed to Visual Basic.NET), you can create a "control array" and one event handler can handle all of the events. You can use the caption property to figure out what to do.

    When one of the keys is pressed, you have to add a numeral to an "accumulator". This can be a text box on the form. So, if I press <1><2><3>, you'll want "123" to appear in the text box. This is simple stuff.

    Finally, when a function key, "+", "-", "*", "/", you have to process it. Basically, you'll store the value in the accumulator text box into a hidden variable. You'll save the operation (the function key) so you'll know what to do when +, -, *, or / is hit again or when "=" is hit. You'll then allow the user to hit numeral keys to put a value into the "accumulator".

    Start by putting the 16 buttons on the form and labeling them. Tell me what the labels are. Put a text box for a visible accumulator and create a variable for a hidden accumulator. Create an event handler for clicking the number keys. Make it so that when a number key is clicked, a numeral is added to the text box. When you get that done, put the source code in a ZIP file and attach it to a post here. (click the <Go Advanced> button. I'll coach you on handling the +, -, *, /, and = buttons.
    bhawna sohni's Avatar
    bhawna sohni Posts: 1, Reputation: 1
    New Member
     
    #3

    Jul 12, 2009, 11:51 AM
    I'm making project on making calculator in visual basic 6.0 version. Can you please help me out for this. I'm in hurry, please help me and answer my query as soon as possible. Thank you.
    Perito's Avatar
    Perito Posts: 3,139, Reputation: 150
    Ultra Member
     
    #4

    Jul 13, 2009, 10:08 AM

    I'm making project on making calculator in visual basic 6.0 version. Can you please help me out for this. I'm in hurry, please help me and answer my query as soon as possible. Thank you.
    You should post your question in a new thread or no one will see it.

    I'll give you the same answer that I gave to "gian carlo". It's in the box above your post. Show me what you did (you can put all of the program files in a zip file, click "Go Advanced", and attach it to your message) and I'll be happy to help you out with what you're stumped on. But, no one here will do your homework for you.
    kersie's Avatar
    kersie Posts: 1, Reputation: 1
    New Member
     
    #5

    May 1, 2012, 05:31 AM
    Please I make a scientific calculator but I can't explain it?please help me

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!

Color coding on line does not match jack color coding [ 11 Answers ]

The line going into the old phone jack has orange, green, blue and 3 white wires in it. Bought a new jack at Radio Shack and the colors of the wires in the replacement jack are red, green, black and yellow. Verizon repair was at best, snotty in telling me "we cannot tell you how to do repairs...

PCL coding for printer [ 7 Answers ]

Yes, I am asking a seriously techie question as I'm stuck. Right then. This is for printers from our ERP system, QAD's MFG Pro EB2.1 on Progress 10. I'm trying to recode or printers to scale print jobs on to A4 paper. Now I have found the coding for the paper, but cannot work out how to get...

Listview coding [ 2 Answers ]

What code should I write so that.. if I click on any particular item on listview its corresponding contents from database :confused: are displayed in another listview

Software coding [ 2 Answers ]

Is software Fixed Asset or not?

Color Coding [ 1 Answers ]

If Blue,red,black And Green Color Is Used While Writing ,what Signifies Blue,what Signifies Red,what Signifies Black And What Signifies Green?


View more questions Search