Code the click event of the Play Game button to do the following
i. Generate a random integer between 1 and 100
ii. Code a loop that will end when the user guesses the number or 10 guesses have failed to find the number.
iii. Use an inputbox function so that the user can enter each guess.
iv. If the user does not enter an integer number display an error messagebox, show the answer, and exit the loop. If the user enters a number outside the range of 0 – 100 display an error messagebox, show the answer, and exit the loop.
v. Show each guess in the Guesses Label using concatenation.
vi. If the guess is incorrect change the message portion of the InputBox function to “Guess Higher” or “Guess Lower”. Hint: Only use one InputBox – not three different ones.
vii. Use a messagebox to inform the user that the correct number has been guessed or that ten guesses have failed to guess the number.
My answer so far:
Private Sub btnPlay_Click(sender As Object, e As EventArgs) Handles btnPlay.Click
Dim ObjRandom As New Random
Dim intGuesses As Integer
Dim intcount As Integer
Dim value As Integer = CInt(Int((100 * Rnd()) + 1))