Public Class Form2

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim num1, num2, sum As Single
        num1 = TextBox1.Text
        num2 = TextBox2.Text
        sum = num1 + num2     '兩數相加
        TextBox3.Text = sum
    End Sub
End Class
