0% found this document useful (0 votes)
41 views1 page

Heri

Visual Basic is a derivative of the BASIC programming language designed for rapid development of graphical computer software. The document includes a code snippet for a simple calculator application with functions for addition, subtraction, multiplication, and division, as well as a reset button. Each operation is triggered by clicking corresponding buttons, updating the result in a designated text box.

Uploaded by

Devi hidayati
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views1 page

Heri

Visual Basic is a derivative of the BASIC programming language designed for rapid development of graphical computer software. The document includes a code snippet for a simple calculator application with functions for addition, subtraction, multiplication, and division, as well as a reset button. Each operation is triggered by clicking corresponding buttons, updating the result in a designated text box.

Uploaded by

Devi hidayati
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

1.

Visual Basic merupakan turunan bahasa pemrograman BASIC dan menawarkan


pengembangan perangkat lunak komputer berbasis grafik dengan cepat.
2.Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
TextBox3.Text = Val(TextBox1.Text) + Val(TextBox2.Text)
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button2.Click
TextBox3.Text = Val(TextBox1.Text) - Val(TextBox2.Text)
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button3.Click
TextBox3.Text = Val(TextBox1.Text) * Val(TextBox2.Text)
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button4.Click
TextBox3.Text = Val(TextBox1.Text) / Val(TextBox2.Text)
End Sub

3. Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button5.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
End Sub
End ClassPublic Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
TextBox3.Text = Val(TextBox1.Text) + Val(TextBox2.Text)
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button2.Click
TextBox3.Text = Val(TextBox1.Text) - Val(TextBox2.Text)
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button3.Click
TextBox3.Text = Val(TextBox1.Text) * Val(TextBox2.Text)
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button4.Click
TextBox3.Text = Val(TextBox1.Text) / Val(TextBox2.Text)
End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button5.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
End Sub
End Class

You might also like