Results 1 to 6 of 6

Thread: A Basic Calculator

  1. #1

    Thread Starter
    Fanatic Member BenJones's Avatar
    Join Date
    Mar 2010
    Location
    Wales UK
    Posts
    814

    Lightbulb A Basic Calculator

    Hi this is a basic Calculator I been working on for doing very simple maths.
    Supports Addition, Subtraction, Multiplication and division.
    Also check for division by zero.



    Hope you like it.
    Comments suggestions welcome.
    Attached Files Attached Files

  2. #2
    New Member
    Join Date
    Sep 2012
    Posts
    1

    Re: A Basic Calculator

    thanks but that is too much of code man can i have your msn ? we need to start a group on skype,irc , msn , yahoo to start some real discussion on vb i'm still a beginner in developing world i'm not yet a programmer

  3. #3
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,381

    Re: A Basic Calculator

    I really like the layout of this calculator. I think that it's easier to use than a standard basic calculator, to many buttons and you can't see the first number you used after you've choosen the operator. This is a clever and unique way to do basic operations. Another great codebank post!
    -David
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

  4. #4
    Member
    Join Date
    Sep 2013
    Posts
    32

    Re: A Basic Calculator

    why dont you do this.
    Dim Value As Double = val( ' your value... & "")
    Dim Value2 As Double = val( ' your value. & "")
    Dim Value3 as double = 0
    select case Method
    case 0
    value3 = value + value2
    case 1
    value3 = value * value2
    case 2
    value3 = value - value2
    case 3
    value3 = value / value2
    end select

    textbox1.text = value3

  5. #5
    Addicted Member
    Join Date
    Jun 2009
    Location
    Townsville, Qld, Australia
    Posts
    135

    Re: A Basic Calculator

    I'm possibly being a bit picky here but I would put the Choose Operator frame in between the two number text boxes and label the radio buttons "Plus", "Minus", "Multiplied by" and "Divided by", because subtraction and division are not commutative operations.

  6. #6
    Addicted Member
    Join Date
    Oct 2013
    Posts
    212

    Re: A Basic Calculator

    It is a pretty cool calculator.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width