Private Sub btnRandomize_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRandomize.Click
Dim RandomMix As Integer
Dim RandomMix2 As Integer
Dim RandomMix3 As Integer
Dim RandomMix4 As Integer
Dim RandomMix5 As Integer
Dim RandomMix6 As Integer
Dim RandomMix7 As Integer
Dim RandomMix8 As Integer
Dim RandomMix9 As Integer
Dim RandomMix10 As Integer
Dim RandomMix11 As Integer
Dim RandomMix12 As Integer
Dim RandomMix13 As Integer
Dim RandomMix14 As Integer
Dim RandomMix15 As Integer
Dim RandomMix16 As Integer
Randomize()
RandomMix = Rnd() * 1 + 1
Randomize()
RandomMix2 = Rnd() * 1 + 1
Randomize()
RandomMix3 = Rnd() * 1 + 1
Randomize()
RandomMix4 = Rnd() * 1 + 1
Randomize()
RandomMix5 = Rnd() * 1 + 1
Randomize()
RandomMix6 = Rnd() * 1 + 1
Randomize()
RandomMix7 = Rnd() * 1 + 1
Randomize()
RandomMix8 = Rnd() * 1 + 1
Randomize()
RandomMix9 = Rnd() * 1 + 1
Randomize()
RandomMix10 = Rnd() * 1 + 1
Randomize()
RandomMix11 = Rnd() * 1 + 1
Randomize()
RandomMix12 = Rnd() * 1 + 1
Randomize()
RandomMix13 = Rnd() * 1 + 1
Randomize()
RandomMix14 = Rnd() * 1 + 1
Randomize()
RandomMix15 = Rnd() * 1 + 1
Randomize()
RandomMix16 = Rnd() * 1 + 1
Dim RandomInteger As Integer
Dim Randominteger2 As Integer
Dim RandomInteger3 As Integer
Dim RandomInteger4 As Integer
Dim RandomInteger5 As Integer
Dim RandomInteger6 As Integer
Dim RandomInteger7 As Integer
Dim RandomInteger8 As Integer
Dim RandomInteger9 As Integer
Dim Randominteger10 As Integer
Dim RandomInteger11 As Integer
Dim RandomInteger12 As Integer
Dim RandomInteger13 As Integer
Dim RandomInteger14 As Integer
Dim RandomInteger15 As Integer
Dim RandomInteger16 As Integer
Randomize()
RandomInteger = Rnd() * 3 + 1
Randomize()
Randominteger2 = Rnd() * 3 + 1
Randomize()
RandomInteger3 = Rnd() * 3 + 1
Randomize()
RandomInteger4 = Rnd() * 3 + 1
Randomize()
RandomInteger5 = Rnd() * 3 + 1
Randomize()
RandomInteger6 = Rnd() * 3 + 1
Randomize()
RandomInteger7 = Rnd() * 3 + 1
Randomize()
RandomInteger8 = Rnd() * 3 + 1
Randomize()
RandomInteger9 = Rnd() * 3 + 1
Randomize()
Randominteger10 = Rnd() * 3 + 1
Randomize()
RandomInteger11 = Rnd() * 3 + 1
Randomize()
RandomInteger12 = Rnd() * 3 + 1
Randomize()
RandomInteger13 = Rnd() * 3 + 1
Randomize()
RandomInteger14 = Rnd() * 3 + 1
Randomize()
RandomInteger15 = Rnd() * 3 + 1
Randomize()
RandomInteger16 = Rnd() * 3 + 1
'RANDOM 1
If RandomMix = 1 Then
intPartOne += 1
If intPartOne <= 4 Then
If RandomInteger = 1 Then
picRandom = picBlack
ElseIf RandomInteger = 2 Then
picRandom = picBlue
ElseIf RandomInteger = 3 Then
picRandom = picGray
ElseIf RandomInteger = 4 Then
picRandom = picOrange
End If
ElseIf intPartOne > 4 Then
If RandomInteger = 1 Then
picRandom = picGreen
ElseIf RandomInteger = 2 Then
picRandom = picRed
ElseIf RandomInteger = 3 Then
picRandom = picPurple
ElseIf RandomInteger = 4 Then
picRandom = picYellow
End If
End If
ElseIf RandomMix = 2 Then
intPartTwo += 1
If intPartTwo <= 4 Then
If RandomInteger = 1 Then
picRandom = picGreen
ElseIf RandomInteger = 2 Then
picRandom = picRed
ElseIf RandomInteger = 3 Then
picRandom = picPurple
ElseIf RandomInteger = 4 Then
picRandom = picYellow
End If
ElseIf intPartTwo > 4 Then
If RandomInteger = 1 Then
picRandom = picBlack
ElseIf RandomInteger = 2 Then
picRandom = picBlue
ElseIf RandomInteger = 3 Then
picRandom = picGray
ElseIf RandomInteger = 4 Then
picRandom = picOrange
End If
End If
End If
'RANDOM 2
If RandomMix2 = 1 Then
intPartOne += 1
If intPartOne <= 4 Then
If Randominteger2 = 1 Then
picRandom2 = picBlack
ElseIf Randominteger2 = 2 Then
picRandom2 = picBlue
ElseIf Randominteger2 = 3 Then
picRandom2 = picGray
ElseIf Randominteger2 = 4 Then
picRandom2 = picOrange
End If
ElseIf intPartOne > 4 Then
If Randominteger2 = 1 Then
picRandom2 = picGreen
ElseIf Randominteger2 = 2 Then
picRandom2 = picRed
ElseIf Randominteger2 = 3 Then
picRandom2 = picPurple
ElseIf Randominteger2 = 4 Then
picRandom2 = picYellow
End If
End If
ElseIf RandomMix2 = 2 Then
intPartTwo += 1
If intPartTwo <= 4 Then
If Randominteger2 = 1 Then
picRandom2 = picGreen
ElseIf Randominteger2 = 2 Then
picRandom2 = picRed
ElseIf Randominteger2 = 3 Then
picRandom2 = picPurple
ElseIf Randominteger2 = 4 Then
picRandom2 = picYellow
End If
ElseIf intPartTwo > 4 Then
If Randominteger2 = 1 Then
picRandom2 = picBlack
ElseIf Randominteger2 = 2 Then
picRandom2 = picBlue
ElseIf Randominteger2 = 3 Then
picRandom2 = picGray
ElseIf Randominteger2 = 4 Then
picRandom2 = picOrange
End If
End If
End If
'RANDOM 3
If RandomMix3 = 1 Then
intPartOne += 1
If intPartOne <= 4 Then
If RandomInteger3 = 1 Then
picRandom3 = picBlack
ElseIf RandomInteger3 = 2 Then
picRandom3 = picBlue
ElseIf RandomInteger3 = 3 Then
picRandom3 = picGray
ElseIf RandomInteger3 = 4 Then
picRandom3 = picOrange
End If
ElseIf intPartOne > 4 Then
If RandomInteger3 = 1 Then
picRandom3 = picGreen
ElseIf RandomInteger3 = 2 Then
picRandom3 = picRed
ElseIf RandomInteger3 = 3 Then
picRandom3 = picPurple
ElseIf RandomInteger3 = 4 Then
picRandom3 = picYellow
End If
End If
ElseIf RandomMix3 = 2 Then
intPartTwo += 1
If intPartTwo <= 4 Then
If RandomInteger3 = 1 Then
picRandom3 = picGreen
ElseIf RandomInteger3 = 2 Then
picRandom3 = picRed
ElseIf RandomInteger3 = 3 Then
picRandom3 = picPurple
ElseIf RandomInteger3 = 4 Then
picRandom3 = picYellow
End If
ElseIf intPartTwo > 4 Then
If RandomInteger3 = 1 Then
picRandom3 = picBlack
ElseIf RandomInteger3 = 2 Then
picRandom3 = picBlue
ElseIf RandomInteger3 = 3 Then
picRandom3 = picGray
ElseIf RandomInteger3 = 4 Then
picRandom3 = picOrange
End If
End If
End If
'RANDOM 4
If RandomMix4 = 1 Then
intPartOne += 1
If intPartOne <= 4 Then
If RandomInteger4 = 1 Then
picRandom4 = picBlack
ElseIf RandomInteger4 = 2 Then
picRandom4 = picBlue
ElseIf RandomInteger4 = 3 Then
picRandom4 = picGray
ElseIf RandomInteger4 = 4 Then
picRandom4 = picOrange
End If
ElseIf intPartOne > 4 Then
If RandomInteger4 = 1 Then
picRandom4 = picGreen
ElseIf RandomInteger4 = 2 Then
picRandom4 = picRed
ElseIf RandomInteger4 = 3 Then
picRandom4 = picPurple
ElseIf RandomInteger4 = 4 Then
picRandom4 = picYellow
End If
End If
ElseIf RandomMix4 = 2 Then
intPartTwo += 1
If intPartTwo <= 4 Then
If RandomInteger4 = 1 Then
picRandom4 = picGreen
ElseIf RandomInteger4 = 2 Then
picRandom4 = picRed
ElseIf RandomInteger4 = 3 Then
picRandom4 = picPurple
ElseIf RandomInteger4 = 4 Then
picRandom4 = picYellow
End If
ElseIf intPartTwo > 4 Then
If RandomInteger4 = 1 Then
picRandom4 = picBlack
ElseIf RandomInteger4 = 2 Then
picRandom4 = picBlue
ElseIf RandomInteger4 = 3 Then
picRandom4 = picGray
ElseIf RandomInteger4 = 4 Then
picRandom4 = picOrange
End If
End If
End If
'RANDOM 5
If RandomMix5 = 1 Then
intPartOne += 1
If intPartOne <= 4 Then
If RandomInteger5 = 1 Then
picRandom5 = picBlack
ElseIf RandomInteger5 = 2 Then
picRandom5 = picBlue
ElseIf RandomInteger5 = 3 Then
picRandom5 = picGray
ElseIf RandomInteger5 = 4 Then
picRandom5 = picOrange
End If
ElseIf intPartOne > 4 Then
If RandomInteger5 = 1 Then
picRandom5 = picGreen
ElseIf RandomInteger5 = 2 Then
picRandom5 = picRed
ElseIf RandomInteger5 = 3 Then
picRandom5 = picPurple
ElseIf RandomInteger5 = 4 Then
picRandom5 = picYellow
End If
End If
ElseIf RandomMix5 = 2 Then
intPartTwo += 1
If intPartTwo <= 4 Then
If RandomInteger5 = 1 Then
picRandom5 = picGreen
ElseIf RandomInteger5 = 2 Then
picRandom5 = picRed
ElseIf RandomInteger5 = 3 Then
picRandom5 = picPurple
ElseIf RandomInteger5 = 4 Then
picRandom5 = picYellow
End If
ElseIf intPartTwo > 4 Then
If RandomInteger5 = 1 Then
picRandom5 = picBlack
ElseIf RandomInteger5 = 2 Then
picRandom5 = picBlue
ElseIf RandomInteger5 = 3 Then
picRandom5 = picGray
ElseIf RandomInteger5 = 4 Then
picRandom5 = picOrange
End If
End If
End If
'RANDOM 6
If RandomMix6 = 1 Then
intPartOne += 1
If intPartOne <= 4 Then
If RandomInteger6 = 1 Then
picRandom6 = picBlack
ElseIf RandomInteger6 = 2 Then
picRandom6 = picBlue
ElseIf RandomInteger6 = 3 Then
picRandom6 = picGray
ElseIf RandomInteger6 = 4 Then
picRandom6 = picOrange
End If
ElseIf intPartOne > 4 Then
If RandomInteger6 = 1 Then
picRandom6 = picGreen
ElseIf RandomInteger6 = 2 Then
picRandom6 = picRed
ElseIf RandomInteger6 = 3 Then
picRandom6 = picPurple
ElseIf RandomInteger6 = 4 Then
picRandom6 = picYellow
End If
End If
ElseIf RandomMix6 = 2 Then
intPartTwo += 1
If intPartTwo <= 4 Then
If RandomInteger6 = 1 Then
picRandom6 = picGreen
ElseIf RandomInteger6 = 2 Then
picRandom6 = picRed
ElseIf RandomInteger6 = 3 Then
picRandom6 = picPurple
ElseIf RandomInteger6 = 4 Then
picRandom6 = picYellow
End If
ElseIf intPartTwo > 4 Then
If RandomInteger6 = 1 Then
picRandom6 = picBlack
ElseIf RandomInteger6 = 2 Then
picRandom6 = picBlue
ElseIf RandomInteger6 = 3 Then
picRandom6 = picGray
ElseIf RandomInteger6 = 4 Then
picRandom6 = picOrange
End If
End If
End If
'RANDOM 7
If RandomMix7 = 1 Then
intPartOne += 1
If intPartOne <= 4 Then
If RandomInteger7 = 1 Then
picRandom7 = picBlack
ElseIf RandomInteger7 = 2 Then
picRandom7 = picBlue
ElseIf RandomInteger7 = 3 Then
picRandom7 = picGray
ElseIf RandomInteger7 = 4 Then
picRandom7 = picOrange
End If
ElseIf intPartOne > 4 Then
If RandomInteger7 = 1 Then
picRandom7 = picGreen
ElseIf RandomInteger7 = 2 Then
picRandom7 = picRed
ElseIf RandomInteger7 = 3 Then
picRandom7 = picPurple
ElseIf RandomInteger7 = 4 Then
picRandom7 = picYellow
End If
End If
ElseIf RandomMix7 = 2 Then
intPartTwo += 1
If intPartTwo <= 4 Then
If RandomInteger7 = 1 Then
picRandom7 = picGreen
ElseIf RandomInteger7 = 2 Then
picRandom7 = picRed
ElseIf RandomInteger7 = 3 Then
picRandom7 = picPurple
ElseIf RandomInteger7 = 4 Then
picRandom7 = picYellow
End If
ElseIf intPartTwo > 4 Then
If RandomInteger7 = 1 Then
picRandom7 = picBlack
ElseIf RandomInteger7 = 2 Then
picRandom7 = picBlue
ElseIf RandomInteger7 = 3 Then
picRandom7 = picGray
ElseIf RandomInteger7 = 4 Then
picRandom7 = picOrange
End If
End If
End If
'RANDOM 8
If RandomMix8 = 1 Then
intPartOne += 1
If intPartOne <= 4 Then
If RandomInteger8 = 1 Then
picRandom8 = picBlack
ElseIf RandomInteger8 = 2 Then
picRandom8 = picBlue
ElseIf RandomInteger8 = 3 Then
picRandom8 = picGray
ElseIf RandomInteger8 = 4 Then
picRandom8 = picOrange
End If
ElseIf intPartOne > 4 Then
If RandomInteger8 = 1 Then
picRandom8 = picGreen
ElseIf RandomInteger8 = 2 Then
picRandom8 = picRed
ElseIf RandomInteger8 = 3 Then
picRandom8 = picPurple
ElseIf RandomInteger8 = 4 Then
picRandom8 = picYellow
End If
End If
ElseIf RandomMix8 = 2 Then
intPartTwo += 1
If intPartTwo <= 4 Then
If RandomInteger8 = 1 Then
picRandom8 = picGreen
ElseIf RandomInteger8 = 2 Then
picRandom8 = picRed
ElseIf RandomInteger8 = 3 Then
picRandom8 = picPurple
ElseIf RandomInteger8 = 4 Then
picRandom8 = picYellow
End If
ElseIf intPartTwo > 4 Then
If RandomInteger8 = 1 Then
picRandom8 = picBlack
ElseIf RandomInteger8 = 2 Then
picRandom8 = picBlue
ElseIf RandomInteger8 = 3 Then
picRandom8 = picGray
ElseIf RandomInteger8 = 4 Then
picRandom8 = picOrange
End If
End If
End If
'random 9
If RandomMix9 = 1 Then
intPartOne += 1
If intPartOne <= 4 Then
If RandomInteger9 = 1 Then
picRandom9 = picBlack
ElseIf RandomInteger9 = 2 Then
picRandom9 = picBlue
ElseIf RandomInteger9 = 3 Then
picRandom9 = picGray
ElseIf RandomInteger9 = 4 Then
picRandom9 = picOrange
End If
ElseIf intPartOne > 4 Then
If RandomInteger9 = 1 Then
picRandom9 = picGreen
ElseIf RandomInteger9 = 2 Then
picRandom9 = picRed
ElseIf RandomInteger9 = 3 Then
picRandom9 = picPurple
ElseIf RandomInteger9 = 4 Then
picRandom9 = picYellow
End If
End If
ElseIf RandomMix9 = 2 Then
intPartTwo += 1
If intPartTwo <= 4 Then
If RandomInteger9 = 1 Then
picRandom9 = picGreen
ElseIf RandomInteger9 = 2 Then
picRandom9 = picRed
ElseIf RandomInteger9 = 3 Then
picRandom9 = picPurple
ElseIf RandomInteger9 = 4 Then
picRandom9 = picYellow
End If
ElseIf intPartTwo > 4 Then
If RandomInteger9 = 1 Then
picRandom9 = picBlack
ElseIf RandomInteger9 = 2 Then
picRandom9 = picBlue
ElseIf RandomInteger9 = 3 Then
picRandom9 = picGray
ElseIf RandomInteger9 = 4 Then
picRandom9 = picOrange
End If
End If
End If
'10
If RandomMix10 = 1 Then
intPartOne += 1
If intPartOne <= 4 Then
If Randominteger10 = 1 Then
picRandom10 = picBlack
ElseIf Randominteger10 = 2 Then
picRandom10 = picBlue
ElseIf Randominteger10 = 3 Then
picRandom10 = picGray
ElseIf Randominteger10 = 4 Then
picRandom10 = picOrange
End If
ElseIf intPartOne > 4 Then
If Randominteger10 = 1 Then
picRandom10 = picGreen
ElseIf Randominteger10 = 2 Then
picRandom10 = picRed
ElseIf Randominteger10 = 3 Then
picRandom10 = picPurple
ElseIf Randominteger10 = 4 Then
picRandom10 = picYellow
End If
End If
ElseIf RandomMix10 = 2 Then
intPartTwo += 1
If intPartTwo <= 4 Then
If Randominteger10 = 1 Then
picRandom10 = picGreen
ElseIf Randominteger10 = 2 Then
picRandom10 = picRed
ElseIf Randominteger10 = 3 Then
picRandom10 = picPurple
ElseIf Randominteger10 = 4 Then
picRandom10 = picYellow
End If
ElseIf intPartTwo > 4 Then
If Randominteger10 = 1 Then
picRandom10 = picBlack
ElseIf Randominteger10 = 2 Then
picRandom10 = picBlue
ElseIf Randominteger10 = 3 Then
picRandom10 = picGray
ElseIf Randominteger10 = 4 Then
picRandom10 = picOrange
End If
End If
End If
'11
If RandomMix11 = 1 Then
intPartOne += 1
If intPartOne <= 4 Then
If RandomInteger11 = 1 Then
picRandom11 = picBlack
ElseIf RandomInteger11 = 2 Then
picRandom11 = picBlue
ElseIf RandomInteger11 = 3 Then
picRandom11 = picGray
ElseIf RandomInteger11 = 4 Then
picRandom11 = picOrange
End If
ElseIf intPartOne > 4 Then
If RandomInteger11 = 1 Then
picRandom11 = picGreen
ElseIf RandomInteger11 = 2 Then
picRandom11 = picRed
ElseIf RandomInteger11 = 3 Then
picRandom11 = picPurple
ElseIf RandomInteger11 = 4 Then
picRandom11 = picYellow
End If
End If
ElseIf RandomMix11 = 2 Then
intPartTwo += 1
If intPartTwo <= 4 Then
If RandomInteger11 = 1 Then
picRandom11 = picGreen
ElseIf RandomInteger11 = 2 Then
picRandom11 = picRed
ElseIf RandomInteger11 = 3 Then
picRandom11 = picPurple
ElseIf RandomInteger11 = 4 Then
picRandom11 = picYellow
End If
ElseIf intPartTwo > 4 Then
If RandomInteger11 = 1 Then
picRandom11 = picBlack
ElseIf RandomInteger11 = 2 Then
picRandom11 = picBlue
ElseIf RandomInteger11 = 3 Then
picRandom11 = picGray
ElseIf RandomInteger11 = 4 Then
picRandom11 = picOrange
End If
End If
End If
'12
If RandomMix12 = 1 Then
intPartOne += 1
If intPartOne <= 4 Then
If RandomInteger12 = 1 Then
picRandom12 = picBlack
ElseIf RandomInteger12 = 2 Then
picRandom12 = picBlue
ElseIf RandomInteger12 = 3 Then
picRandom12 = picGray
ElseIf RandomInteger12 = 4 Then
picRandom12 = picOrange
End If
ElseIf intPartOne > 4 Then
If RandomInteger12 = 1 Then
picRandom12 = picGreen
ElseIf RandomInteger12 = 2 Then
picRandom12 = picRed
ElseIf RandomInteger12 = 3 Then
picRandom12 = picPurple
ElseIf RandomInteger12 = 4 Then
picRandom12 = picYellow
End If
End If
ElseIf RandomMix12 = 2 Then
intPartTwo += 1
If intPartTwo <= 4 Then
If RandomInteger12 = 1 Then
picRandom12 = picGreen
ElseIf RandomInteger12 = 2 Then
picRandom12 = picRed
ElseIf RandomInteger12 = 3 Then
picRandom12 = picPurple
ElseIf RandomInteger12 = 4 Then
picRandom12 = picYellow
End If
ElseIf intPartTwo > 4 Then
If RandomInteger12 = 1 Then
picRandom12 = picBlack
ElseIf RandomInteger12 = 2 Then
picRandom12 = picBlue
ElseIf RandomInteger12 = 3 Then
picRandom12 = picGray
ElseIf RandomInteger12 = 4 Then
picRandom12 = picOrange
End If
End If
End If
If RandomMix13 = 1 Then
intPartOne += 1
If intPartOne <= 4 Then
If RandomInteger13 = 1 Then
picRandom13 = picBlack
ElseIf RandomInteger13 = 2 Then
picRandom13 = picBlue
ElseIf RandomInteger13 = 3 Then
picRandom13 = picGray
ElseIf RandomInteger13 = 4 Then
picRandom13 = picOrange
End If
ElseIf intPartOne > 4 Then
If RandomInteger13 = 1 Then
picRandom13 = picGreen
ElseIf RandomInteger13 = 2 Then
picRandom13 = picRed
ElseIf RandomInteger13 = 3 Then
picRandom13 = picPurple
ElseIf RandomInteger13 = 4 Then
picRandom13 = picYellow
End If
End If
ElseIf RandomMix13 = 2 Then
intPartTwo += 1
If intPartTwo <= 4 Then
If RandomInteger13 = 1 Then
picRandom13 = picGreen
ElseIf RandomInteger13 = 2 Then
picRandom13 = picRed
ElseIf RandomInteger13 = 3 Then
picRandom13 = picPurple
ElseIf RandomInteger13 = 4 Then
picRandom13 = picYellow
End If
ElseIf intPartTwo > 4 Then
If RandomInteger13 = 1 Then
picRandom13 = picBlack
ElseIf RandomInteger13 = 2 Then
picRandom13 = picBlue
ElseIf RandomInteger13 = 3 Then
picRandom13 = picGray
ElseIf RandomInteger13 = 4 Then
picRandom13 = picOrange
End If
End If
End If
btnRandomize.Visible = False