Monday, 3 March 2014

Vb.net Project : 01 : Two Number Summation, multiplication, subtraction, division using diffrent button'



Definition:
                Tow Number Summation, multiplication, subtraction, division using diffrent button'


Description:
           
            Using this Project we can do addition, subtraction, multiplication, & also division using different buttons

Ø  .In this project we needed two text boxes as well as two labels to insert two different numbers.
Ø  Then needed four different buttons to apply the operation like addition, subtraction, multiplication, division.
Ø  Then again needed one textbox & lable for print the result.
Ø  We write the code in the click event of the all operation button to get the output.


Design:



Code:


Public Class Form1

Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label3.Click

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox3.Text = Convert.ToDouble(TextBox1.Text) + Convert.ToDouble(TextBox2.Text)

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TextBox3.Text = Convert.ToDouble(TextBox1.Text) - Convert.ToDouble(TextBox2.Text)
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
TextBox3.Text = Convert.ToDouble(TextBox1.Text) / Convert.ToDouble(TextBox2.Text)
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
TextBox3.Text = Convert.ToDouble(TextBox1.Text) * Convert.ToDouble(TextBox2.Text)
End Sub


End Class

Output: