You are on page 1of 2

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click
Dim firstname As String = ""
Dim surname As String = ""
Dim phone As Integer = 0
Dim age As Integer = 0
Dim gender As String = ""
firstname = TextBox1.Text
surname = TextBox2.Text
phone = TextBox3.Text
age = TextBox4.Text
gender = TextBox5.Text
Label8.Text = TextBox1.Text & TextBox2.Text
Label9.Text = TextBox3.Text
Label10.Text = TextBox4.Text
Label11.Text = TextBox5.Text
End Sub

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


Handles Button2.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
End Sub
End Class

You might also like