Skip to content

Instantly share code, notes, and snippets.

@canokay
Created November 11, 2018 21:23
Show Gist options
  • Save canokay/934fa3a289bf0d6c269a2399884956db to your computer and use it in GitHub Desktop.
Save canokay/934fa3a289bf0d6c269a2399884956db to your computer and use it in GitHub Desktop.
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
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