Advertisement
Guest User

Untitled

a guest
Oct 26th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. Static intBackR As Integer = rnd.Next(255)
  2. Static intBackG As Integer = rnd.Next(255)
  3. Static intBackB As Integer = rnd.Next(255)
  4. Static blnIncrR As Boolean = True
  5. 'MsgBox(rnd.Next(100))
  6. Static blnIncrG As Boolean = False
  7. Static blnIncrB As Boolean = True
  8.  
  9.  
  10. If blnIncrR Then
  11. intBackR += 1
  12. Else
  13. intBackR -= 1
  14. End If
  15. If blnIncrG Then
  16. intBackG += 1
  17. Else
  18. intBackG -= 1
  19. End If
  20. If blnIncrB Then
  21. intBackB += 1
  22. Else
  23. intBackB -= 1
  24. End If
  25.  
  26. If intBackR >= 255 Then
  27. blnIncrR = False
  28. ElseIf intBackR <= 0 Then
  29. blnIncrR = True
  30. End If
  31. If intBackG >= 255 Then
  32. blnIncrG = False
  33. ElseIf intBackG <= 0 Then
  34. blnIncrG = True
  35. End If
  36. If intBackB >= 255 Then
  37. blnIncrB = False
  38. ElseIf intBackB <= 0 Then
  39. blnIncrB = True
  40. End If
  41.  
  42. Me.BackColor = Color.FromArgb(255, intBackR, intBackG, intBackB)
  43.  
  44. 'lblmessage.Text = intBackR & ", " & intBackG & ", " & intBackB
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement