|
-
July 28th, 2003, 08:40 PM
#1
Junior Member
random function in VB
I am developing a project in VB and I thought it would be nice idea to have some sort of animation which would poke out from everwhere RANDOMLY.
I am looking for a function like the one in C++ that's called rand()
-
July 28th, 2003, 09:14 PM
#2
xtremebuster you can do something like the following to create your random numbers.
Dim theRandomNumber 'declare theRandomNumber
Randomize 'needed to creat the random number
theRandomNumber = Int((8 * Rnd) + 1) 'creates a random integer between 1 to 8
Note that Rnd does the randomizing. I hope that helps.
P.S- Your post is in the wrong forum.
Guidance...
- The mind is too beautiful to waste...
Cutty

-
July 28th, 2003, 10:24 PM
#3
-
July 29th, 2003, 11:55 AM
#4
i like to use the timer for the "Randomize" seed...
maybe use a timer control, set the timer duration to a random number + 5000...
yeah, I\'m gonna need that by friday...

-
July 29th, 2003, 06:49 PM
#5
Junior Member
Thanx Cutty and tampabay420.
I'll be giving a try to both the methods explained.
-
July 30th, 2003, 01:10 AM
#6
I thought it would be nice idea to have some sort of animation which would poke out from everwhere RANDOMLY
err...you also have to think about what the user would like. I certainly wouldnt like some bunny hopping randomly over my text while i am trying to type in values. Anyways, if you are the user, then do whatever you want, but if this is for a job, your boss will be mad
Support your right to arm bears.

^^This was the first video game which i played on an old win3.1 box
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
|
|