Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: VB7
Expertise: beginner
Jan 5, 2004

GetRandomColor - Generating a random color

' Return a random color
' Example: Me.BackColor = GetRandomColor()

Function GetRandomColor() As Color
    Dim rand As New Random
    Return Color.FromArgb(rand.Next(0, 256), rand.Next(0, 256), rand.Next(0, _
        256))
End Function
Marco Bellinaso
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap