Advertisement
Guest User

Generating a Random Color in Visual Basic .NET

a guest
Sep 3rd, 2012
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.24 KB | None | 0 0
  1. 'This function returns a color with random red, green, and blue values
  2.  
  3. Function getRandomColor() As Color
  4.  
  5.    Dim random As Random = New Random()
  6.    Return Color.FromArgb(random.Next(256), random.Next(256), random.Next(256))
  7.  
  8. End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement