|
-
Jul 1st, 2004, 08:46 PM
#1
Thread Starter
Hyperactive Member
Getting random color from the Color class?
I'd like to know how to do this with --any class that has various values to choose from.
thanks. anything will help.
-
Jul 1st, 2004, 11:49 PM
#2
How about this:
VB Code:
Dim intRandRed As Integer, intRandGreen As Integer, intRandBlue As Integer
Randomize()
intRandRed = Int((256) * Rnd())
Randomize()
intRandGreen = Int((256) * Rnd())
Randomize()
intRandBlue = Int((256) * Rnd())
System.Drawing.Color.FromArgb(intRandRed, intRandGreen, intRandBlue)
-
Jul 2nd, 2004, 02:57 AM
#3
Naughty froggy. There is no need to put Randomize 3 times, just the once will do, at the top.
I don't live here any more.
-
Jul 2nd, 2004, 03:37 AM
#4
Originally posted by wossname
Naughty froggy. There is no need to put Randomize 3 times, just the once will do, at the top.
I wanted it to be as random as possible!
-
Jul 2nd, 2004, 11:28 PM
#5
Thread Starter
Hyperactive Member
works wonders 
I didn't know about that function =/
-
Jul 3rd, 2004, 02:01 PM
#6
I don't live here any more.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|