This Visual Basic code defines a class with a button click event handler that checks the text in a text box for a number. If the number is less than or equal to 9, it sets a label to say it is a one digit number. If the number is less than 100 but greater than 9, it sets the label to say it is a two digit number.
This Visual Basic code defines a class with a button click event handler that checks the text in a text box for a number. If the number is less than or equal to 9, it sets a label to say it is a one digit number. If the number is less than 100 but greater than 9, it sets the label to say it is a two digit number.
This Visual Basic code defines a class with a button click event handler that checks the text in a text box for a number. If the number is less than or equal to 9, it sets a label to say it is a one digit number. If the number is less than 100 but greater than 9, it sets the label to say it is a two digit number.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click If TextBox1.Text <= 9 Then Label2.Text = "The number is a one digit number." ElseIf TextBox1.Text < 100 Then Label2.Text = "The number is a two digit number." End If End Sub End Class