Create Your Own Calculator Tutorial Part 1 – C Sharp Visual Studio 2008

October 21st, 2010


This is part 1 of my second tutorial. In this tutorial I will show you how to create your very own calculator similar to the windows calculator. Not only will you make a useful program but learn a lot of things that C# can do. Download Link: Part 1: bit.ly Part 2: bit.ly WEBSITE: www.Quack-Ware.com FORUM www.Quack-Ware.com SUBSCRIBE TO MY VIDEOS

admin C Sharp , , , , , , ,

  1. Tyler11440
    October 21st, 2010 at 08:02 | #1

    I need HELP! Why is it when i create a plain win32 project i dont get the “form design” tab? All i can edit is the file menus and such, i am unable to add buttons. And if its not possible, whats the difference between form app and win32?

  2. stanleypleng
    October 21st, 2010 at 08:22 | #2

    could you please give me the source code, because I want to learn how you do it.
    send it to my email address phuastanley2006@yahoo.co.jp
    Thank you in advance

  3. barbie4351
    October 21st, 2010 at 08:54 | #3

    @xXbullet002Xx just double click on that button

  4. xXbullet002Xx
    October 21st, 2010 at 09:51 | #4

    ok i am making a program how do i use a button to open another window(project)?

  5. gunnerll
    October 21st, 2010 at 10:40 | #5

    The decimals don’t work, when you enter: 0.01 + 0.6 it says 7, instead of 0.61 Help pls?

  6. AlexMikael
    October 21st, 2010 at 11:01 | #6

    @xixw you read my mind :P

  7. thisisgaurang
    October 21st, 2010 at 11:21 | #7

    good one dude…!

  8. xixw
    October 21st, 2010 at 11:36 | #8

    instead of doing return and than else just do !=

  9. budabudimir3
    October 21st, 2010 at 11:52 | #9

    You would have saved some time if you had done this.

    void Digit_Clicked(object sender, EventArgs e)
    {
    Button tempButton = (Button)sender;
    textBox1.Text += tempButton.Text;
    }

    and then just apply this to every digit button.

  10. Ruchir5
    October 21st, 2010 at 12:45 | #10

    Nice tutorial. Really helpful.

  11. Sharpielotr123
    October 21st, 2010 at 13:10 | #11

    at 3:20 i get an error for the TextBox1.text = textBox1.Text + “.”;

    the error says: “The name ‘TextBox1′ does not exist in the current context.” the first part, before the equal sign is where this occurs…. could you help me? =]

  12. Sharpielotr123
    October 21st, 2010 at 13:27 | #12

    when ive made my calculator, ive written code for the “1″ button, but when i debug my calculator is blank

  13. Kirbydude777
    October 21st, 2010 at 14:01 | #13

    Is this scripting language similar to LUA?
    I know pretty much lua and it would be great if C sharp was not to different :/

  14. atlanta5hawks
    October 21st, 2010 at 15:01 | #14

    How would you set the textbox1 to display “0″ such as in a Windows calculator? Then once a number button is clicked, the value of “0″ would be replaced by whatever a user pressed?

  15. vanyaxxx
    October 21st, 2010 at 15:22 | #15

    check it dude.
    for example.
    0.1 + 0.9
    doesn’t work :)

  16. N1njafication
    October 21st, 2010 at 16:10 | #16

    to make it a lot nicer you can change textBox1’s TextAlign to Right and change the Form’s border style to fixed 3D

  17. ivanlp4ever
    October 21st, 2010 at 16:27 | #17

    @IrritatingMaze lolz, so you cant place some buttons on a form???

  18. ivanlp4ever
    October 21st, 2010 at 17:27 | #18

    @neutrino216 who are you?

  19. qubec3
    October 21st, 2010 at 18:16 | #19

    hello QuackWare u’ve written a really tutorial but i dont ther’s some problem occured with streming of video

    ther’s always an error occured

    please send me its code plz.

  20. ivoivo001
    October 21st, 2010 at 19:11 | #20

    @QuackWare
    Fixed this as well
    in vb2008 express you have to write the following code above ur scrip”:
    “dim dec as decimal”

  21. QuackWare
    October 21st, 2010 at 19:57 | #21

    @ivoivo001

    Never really used vb.net but I do know for a fact that there is a bool data type in visual basic.

    Something like this:

    Dim isCool As Boolean = True
    ‘ If statement
    If isCool Then
    MsgBox(”Quackware is cool”)
    End If

    Would be the simplest of examples.

  22. ivoivo001
    October 21st, 2010 at 20:42 | #22

    Hello, this tutorial is really helpful, but I am using the vb2008 express edition and i can’t do the + button, the bool feature doesnt exists. Any help please?

  23. QuackWare
    October 21st, 2010 at 21:10 | #23

    @Joeyz1994 If you send me your source code or an image of your source code with the error I can try and debug it and see what is wrong.

  24. Joeyz1994
    October 21st, 2010 at 22:09 | #24

    I am trying to follow your tutorial, and im a noob even at basic coding. But i noticed that your formatting is very different. I am working around it but i am having to type different things to get the same result. Im stuck on bool, it says declaration expected under the error code. Any suggestions :s ? Sorry if that sounds confusing.

  25. dranoel1963
    October 21st, 2010 at 22:48 | #25

    wow so visual studio is for making server programs programs and stuff like that?

  1. No trackbacks yet.