Figure 6-7 shows an application’s form.
The list box is named lstOutput. The buttons are named btnGo and btnExit.
The application’s procedures are as follows:
Private Sub btnGo_Click(...) Handles btnGo.Click
Dim intNumber As Integer
Dim strInput As String
strInput = InputBox("Enter a number")
intNumber = CInt(strInput)
If intNumber <>
Message1()
Message2()
Else
End If
End Sub
Private Sub btnExit_Click(...) Handles btnExit.Click
'Close the form.
Me.Close()
Sub Message1()
lstOutput.Items.Add("Able was I")
Sub Message2()
lstOutput.Items.Add("I saw Elba")
Suppose you run this application and click the btnGo button. What will the application display in the list box if you enter 10 in the input box? What if you enter 5?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here