Webnode

VB Calculator

Hello, in this tutorial I'll teach you how to make a small calculator that will look like this:

(Example)

 

1. Open Visual studio 2010
2. Create a new visual basic windows form application project (.Netframework 3.5 or higher)
3. Call your project Calculator
4. Add 4 buttons, 3 textboxes (and maybe some labels), as you can see in the example picture above.
5. Change the text of your buttons to "+" , "-", "*", "/
6. Set the result-textbox propertie readonly to True:

This will make sure that the user cannot edit the result.

9. Double click the "+" button and add the following codes:

TextBox3.Text = (Integer.Parse(TextBox1.Text) + Integer.Parse(TextBox2.Text)).ToString()
 

10. Double click the '-' button and add the following codes:

TextBox3.Text = (Integer.Parse(TextBox1.Text) - Integer.Parse(TextBox2.Text)).ToString()

11. Double click the '*' button and add the following codes:

TextBox3.Text = (Integer.Parse(TextBox1.Text) * Integer.Parse(TextBox2.Text)).ToString()

12. Double click the '/' button and add the following codes:

TextBox3.Text = (Integer.Parse(TextBox1.Text) / Integer.Parse(TextBox2.Text)).ToString()

And now you made your very own calculator !

Download the source codes:

Calculator.rar (63,9 kB)


Webnode

Topic: VB2010 Calculator

Date: 06/03/2013

By: soshi

Subject: programing

simple .. can you create more than that ?

Reply

—————

Date: 06/03/2013

By: soshi

Subject: programing

simple .. can you create more than that ?

Reply

—————

Date: 27/02/2013

By: Aaron kid

Subject: you all idiots

your all cocksucker hahahahahahahahahahahahahhahaahahaha jews

Reply

—————

Date: 09/02/2013

By: patrick

Subject: suck

fuck mother fucker!!! cock sucker!!

Reply

—————

Date: 08/02/2013

By: misg

Subject: programing

pls send me calculator code in visual studio

Reply

—————

Date: 10/12/2012

By: kiran bala

Subject: calculate

how to create a calculator in vb.net

Reply

—————

Date: 07/11/2012

By: GANESH

Subject: Working Good

Thank you it is working good

Reply

—————

Date: 09/12/2012

By: SAI SUHAN

Subject: Re: Working Good

THE WAY YOU DID THE SIMPLE CALCULATOR IS JUST AS SIMPLE AS A PIECE OF CAKE!
Thank you anyway

Reply

—————

Date: 04/11/2012

By: Tyler

Subject: Caculator

What kind of bullshit is this? I've seen better calculators from a 5 yo.

Reply

—————

Date: 10/10/2012

By: zanal

Subject: calculator code

this shit sucks suck my cock u slut ahahahahah

Reply

—————