1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
Dim a As Integer
Dim b As Integer
If TextBox1.Text <> String.Empty And TextBox2.Text <> String.Empty Then
If Integer.TryParse(TextBox1.Text, a) And Integer.TryParse(TextBox2.Text, b) Then
TextBox3.Text = CStr(a * b)
End If
End If
End Sub
Private Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles TextBox2.TextChanged
Dim a As Integer
Dim b As Integer
If TextBox1.Text <> String.Empty And TextBox2.Text <> String.Empty Then
If Integer.TryParse(TextBox1.Text, a) And Integer.TryParse(TextBox2.Text, b) Then
TextBox3.Text = CStr(a * b)
End If
End If
End Sub |