This code defines a class called Form1 with a private subroutine called Button1_Click that handles clicks on a button. The subroutine checks the value entered in a text box against a list of numbers or a range. It sets the text of a label to indicate whether the car is defective or safe based on the number entered.
This code defines a class called Form1 with a private subroutine called Button1_Click that handles clicks on a button. The subroutine checks the value entered in a text box against a list of numbers or a range. It sets the text of a label to indicate whether the car is defective or safe based on the number entered.
This code defines a class called Form1 with a private subroutine called Button1_Click that handles clicks on a button. The subroutine checks the value entered in a text box against a list of numbers or a range. It sets the text of a label to indicate whether the car is defective or safe based on the number entered.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click If TextBox1.Text = 119 Or TextBox1.Text = 179 Or TextBox1.Text = 221 Or TextBox1.Text = 780 Then Label2.Text = "Your car is defective. Please have it fixed." ElseIf TextBox1.Text > 189 Then Label2.Text = "Your car is defective. Please have it fixed." ElseIf TextBox1.Text > 0 Then Label2.Text = "Your car is safe." End If End Sub End Class