hi, i am stuck on part of my project and very new to VB.
i had cut my picture into 6 equals part
but need to display them randomly, without repeating the same part of the pic again, in random sequence.
eg, pic1,pic2,pic3, pic4,pic5,pic6 to ==> pic3,pic2,pic6, pic1,pic5,pic4
below are part of my code
Dim theImage(0 To 7) As Object
Dim myArray(0 To 7) As Object
theImage(0) = pic1.Image
theImage(1) = pic2.Image
theImage(2) = pic3.Image
theImage(3) = pic4.Image
theImage(4) = pic5.Image
theImage(5) = pic6.Image
theImage(6) = pic7.Image
For i = 0 To 6 Step 1
Do
random = num.Next(0, 7)
Loop While (myArray(random ) <> 0)
myArray(random) = theImage(i)
Next i
the part on the while loop wont work as they cant parse in image.
how do i go about doing it? and my code seems sucky.
thanks in advance
i had cut my picture into 6 equals part
but need to display them randomly, without repeating the same part of the pic again, in random sequence.
eg, pic1,pic2,pic3, pic4,pic5,pic6 to ==> pic3,pic2,pic6, pic1,pic5,pic4
below are part of my code
Dim theImage(0 To 7) As Object
Dim myArray(0 To 7) As Object
theImage(0) = pic1.Image
theImage(1) = pic2.Image
theImage(2) = pic3.Image
theImage(3) = pic4.Image
theImage(4) = pic5.Image
theImage(5) = pic6.Image
theImage(6) = pic7.Image
For i = 0 To 6 Step 1
Do
random = num.Next(0, 7)
Loop While (myArray(random ) <> 0)
myArray(random) = theImage(i)
Next i
the part on the while loop wont work as they cant parse in image.
how do i go about doing it? and my code seems sucky.
thanks in advance
Comment