Simple Calculator in VB.NET

This is a simple program which calculates two numbers. It has four buttons that is Addition, substraction, Multiplication, and Division. Two Textbox has inserted to add two numbers and the result displays in total text box.
This code which displays sum of two numbers:
txtResult.Text = Val(txtFirst.Text) + Val(txtSecond.Text)
Label3.Text = “Sum of two number :”

Subtraction of two numbers:
txtResult.Text = Val(txtFirst.Text) – Val(txtSecond.Text)
Label3.Text = “Subtraction of two number”

Multiplication of two numbers:
txtResult.Text = Val(txtFirst.Text) * Val(txtSecond.Text)
Label3.Text = “Multiplication of two number”

Division of two number:
txtResult.Text = Val(txtFirst.Text) / Val(txtSecond.Text)
Label3.Text = “Division of two number”

This video tutorial explains the demo of this program:

Download Source Code:

download source code

Anu

Leave a Reply