How to Make Calculator on Visual Basic

Fri, Sep 21, 2012, by krishnasaxena2

Browsers

This article explain how to make calculator on visual basic.

1-Open Visual basic

2-Go to new project

3-You see a form 1 dialog

4-From toolbar select textbox twice time

5-Make it long on form 1 dialog

6-then select button from toolbar

7-Make 4 button on it

8-then select label from toolbar

9-Make it on it 

10-name all the button first button as +, second as -, third as *, fourth as /

11-double click on +

12-and write

13- Label2.Text = “+”

        Label1.Text = Val(TextBox1.Text) + (TextBox2.Text)

14-then double click on -, and write

15-Label2.Text = “-”

        Label1.Text = Val(TextBox1.Text) – (TextBox2.Text)

16-then double click on *, and write

17-Label2.Text = “*”

        Label1.Text = Val(TextBox1.Text) * (TextBox2.Text)

18-then double click on /, and write

19-Label2.Text = “/”

        Label1.Text = Val(TextBox1.Text) / (TextBox2.Text)

20-Then click on dubug

1
Liked it
Leave a Reply
comments powered by Disqus