Pages

How to make Calculator using Visual Basic

First Open your Visual Basic.Then click New Project and choose Windows Forms Application and name it Calculator.Click Ok.It will open new window.Go to toolbox and add 4 buttons on the form and one textbox.At last add two labels.One under button 3 and 4 and the other label add it between the two textboxes.Click the label name and on the right side will show up some texts search for label and delete his name and hit enter.Do it the same with the other label.(Your application should look something like this).
Now for this to work you have to add some codes.
Click the "+" button twice and add this code
Label2.Text = "+"
Label1.Text = Val(Textbox1.Text) + Val(Textbox2.Text)
Get back on the Form1(You find this at the top under some icons)
Now Click the "-" button twice and add this code
Label2.Text = "-"
Label1.Text = Val(Textbox1.Text) - Val(Textbox2.Text)
Get back on the Form1
Click the "/" button twice and add this code
Label2.Text = "%"
Label1.Text = Val(Textbox1.Text) / Val(Textbox2.Text)
Get back on the Form 1
At last click the "*"button twice and add this code
Label2.Text = "*"
Label1.Text = Val(Textbox1.Text) * Val(Textbox2.Text)
(Your code list should look something like this)

Your coding is done.Now search this button 
 and click on it to run the application.
If you have some problems you can post a comment.