I am Trying to build a game that uses arrays to select an image from an image list. when i run the game, i get an image in the image box, but it keeps cycling through all three options.
the code so far is:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim flagRight As Integer = 0
Dim flagLeft As Integer = 0
Dim I, J As Integer
Do Until flagRight = 1
I = Int(Rnd() * 3)
picRight.Image = imlRight.Images(I)
flagRight = 1
Loop
Do Until flagLeft = 1
J = Int(Rnd() * 3)
picLeft.Image = imlLeft.Images(J)
picRight.Visible = True
flagLeft = 1
Loop
Can anyone help
thanks a lot
Software/Hardware used:
ASKED:
May 30, 2008 11:53 PM
UPDATED:
July 13, 2008 7:51 AM