Your randomize code looks right but this is basically what you want to do to take that number and turn it into a picture (written in pseudocode out of laziness): Quote: Select Case MyValue
Case 1:
[assign picture #1 to picturebox]
Case 2:
[assign picture #2 to picturebox]
Case 3:
[assign picture #3 to picturebox]
End Select | Select Case basically acts like a giant chain of if-else statements
also, to get the textbox to display "You Win": Quote: | TextBox1.Text = "You Win" | although you should really be using a label if all you're doing is displaying text and not taking in any user input
An easier way to check if you won is to store the player's choice in a separate value. i.e. if the player clicks Button1 then assign PlayerValue to 1. Then just check If PlayerValue = 1 And MyValue = 2 Then you won
Last edited by Jeff Paine : 05-03-2009 at 11:46 PM.
|