|
Public Class Form1
Dim F, S, A As Int16 Private Sub TextBox1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.GotFocus TextBox1.Text = "" TextBox2.Text = "" Label4.Text = "" End Sub Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged, TextBox2.TextChanged If TextBox1.Text = "" Or TextBox2.Text = "" Then Button1.Enabled = False Else Button1.Enabled = True End If End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click F = TextBox1.Text S = TextBox2.Text A = F + S Label4.Text = A End Sub End Class |