Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Static intBackR As Integer = rnd.Next(255)
- Static intBackG As Integer = rnd.Next(255)
- Static intBackB As Integer = rnd.Next(255)
- Static blnIncrR As Boolean = True
- 'MsgBox(rnd.Next(100))
- Static blnIncrG As Boolean = False
- Static blnIncrB As Boolean = True
- If blnIncrR Then
- intBackR += 1
- Else
- intBackR -= 1
- End If
- If blnIncrG Then
- intBackG += 1
- Else
- intBackG -= 1
- End If
- If blnIncrB Then
- intBackB += 1
- Else
- intBackB -= 1
- End If
- If intBackR >= 255 Then
- blnIncrR = False
- ElseIf intBackR <= 0 Then
- blnIncrR = True
- End If
- If intBackG >= 255 Then
- blnIncrG = False
- ElseIf intBackG <= 0 Then
- blnIncrG = True
- End If
- If intBackB >= 255 Then
- blnIncrB = False
- ElseIf intBackB <= 0 Then
- blnIncrB = True
- End If
- Me.BackColor = Color.FromArgb(255, intBackR, intBackG, intBackB)
- 'lblmessage.Text = intBackR & ", " & intBackG & ", " & intBackB
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement