Easy Peasy Calculator
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
7 posts
Page 1 of 1
Hi All Here is a very Easy Peasy Tutorial for making your Own Calculator
![Image]()
On the Form you will need
1 Textbox
17 Buttons
All the code for this tutorial is below
This goes above "Public Class Form1"
This Goes below "Public Form1"
Button (2)
Button (3)
Button (4)
Button (5)
Button (6)
Button (7)
Button (8)
Button (9)
Decimal Point Button
Clear Button
Add Button
Equals Button
Minus Button
Multiply Button
Divide Button

On the Form you will need
1 Textbox
17 Buttons
All the code for this tutorial is below
This goes above "Public Class Form1"
Code: Select all
Option Explicit On
This Goes below "Public Form1"
Code: Select all
Button (1)
Dim FirstNumber As Single
Dim SecondNumber As Single
Dim AnswerNumber As Single
Dim ArithmeticProcess As String
Code: Select all
txtDisplay.Text = txtDisplay.Text & 1
Button (2)
Code: Select all
txtDisplay.Text = txtDisplay.Text & 2
Button (3)
Code: Select all
txtDisplay.Text = txtDisplay.Text & 3
Button (4)
Code: Select all
txtDisplay.Text = txtDisplay.Text & 4
Button (5)
Code: Select all
txtDisplay.Text = txtDisplay.Text & 5
Button (6)
Code: Select all
txtDisplay.Text = txtDisplay.Text & 6
Button (7)
Code: Select all
txtDisplay.Text = txtDisplay.Text & 7
Button (8)
Code: Select all
txtDisplay.Text = txtDisplay.Text & 8
Button (9)
Code: Select all
txtDisplay.Text = txtDisplay.Text & 9
Decimal Point Button
Code: Select all
txtDisplay.Text = txtDisplay.Text & "."
Clear Button
Code: Select all
txtDisplay.Text = "0"
Add Button
Code: Select all
FirstNumber = Val(txtDisplay.Text)
txtDisplay.Text = "0"
ArithmeticProcess = "+"
Equals Button
Code: Select all
SecondNumber = Val(txtDisplay.Text)
If ArithmeticProcess = "+" Then
AnswerNumber = FirstNumber + SecondNumber
End If
If ArithmeticProcess = "-" Then
AnswerNumber = FirstNumber - SecondNumber
End If
If ArithmeticProcess = "X" Then
AnswerNumber = FirstNumber * SecondNumber
End If
If ArithmeticProcess = "/" Then
AnswerNumber = FirstNumber / SecondNumber
End If
txtDisplay.Text = AnswerNumber
Minus Button
Code: Select all
FirstNumber = Val(txtDisplay.Text)
txtDisplay.Text = "0"
ArithmeticProcess = "-"
Multiply Button
Code: Select all
FirstNumber = Val(txtDisplay.Text)
txtDisplay.Text = "0"
ArithmeticProcess = "X"
Divide Button
Code: Select all
ChrisFirstNumber = Val(txtDisplay.Text)
txtDisplay.Text = "0"
ArithmeticProcess = "/"
Hello hungryhounduk,
I realy love the 3d look of this calculator, your still surprising me day after day ;) .
Excellent work keep it up cooll;
Ive never tried to do a calculator in VB before so this is something new for me to play with
I realy love the 3d look of this calculator, your still surprising me day after day ;) .
Excellent work keep it up cooll;
Ive never tried to do a calculator in VB before so this is something new for me to play with

Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
Hi
Its Just a little ditty i knocked up to do the tutorial with
Calculators are quite fun
Chris
Its Just a little ditty i knocked up to do the tutorial with

Calculators are quite fun
Chris
Hello Hungryhounduk!
I have also made a calculator (without a skin) (with more features) which I will be posting soon!
Thanks for the skin!!!!!
I have also made a calculator (without a skin) (with more features) which I will be posting soon!
Thanks for the skin!!!!!
I Love The Skiiiiiiin
‼ <----- Copy it,it is together and if you backspace it it will both erase
☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !"<-----Some Cool symbols.
♂<-----Boy Symbol
²ƽ<--------Mini 2 and 5!
ð<----Not sure what it is.
☺☻<-----Smiles
♪♫<----Music Notes
Others:ß┬ƒ○║■ã¿┼↑
☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !"<-----Some Cool symbols.
♂<-----Boy Symbol

²ƽ<--------Mini 2 and 5!
ð<----Not sure what it is.
☺☻<-----Smiles
♪♫<----Music Notes
Others:ß┬ƒ○║■ã¿┼↑
7 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023