Created
November 11, 2018 21:23
-
-
Save canokay/934fa3a289bf0d6c269a2399884956db to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Class Form1 | |
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load | |
End Sub | |
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click | |
Dim a, b, c As Integer | |
a = Val(TextBox1.Text) | |
b = Val(TextBox2.Text) | |
c = a + b | |
TextBox3.Text = c | |
End Sub | |
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click | |
Dim a, b, c As Single | |
a = Val(TextBox1.Text) | |
b = Val(TextBox2.Text) | |
c = a + b | |
TextBox3.Text = c | |
End Sub | |
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click | |
Dim a, b, c As Single | |
a = CSng(TextBox1.Text) | |
b = CSng(TextBox2.Text) | |
c = a + b | |
TextBox3.Text = c | |
End Sub | |
End Class |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Class Form1 | |
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load | |
End Sub | |
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click | |
TextBox1.Clear() | |
End Sub | |
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click | |
TextBox1.Text = Nothing | |
End Sub | |
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click | |
TextBox1.Text = "" | |
End Sub | |
End Class |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment