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()
Printable View
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()
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...
*Moved from Tutorials*
i like to use the timer for the "Randomize" seed...
maybe use a timer control, set the timer duration to a random number + 5000...Code:Randomize Timer
Thanx Cutty and tampabay420.
I'll be giving a try to both the methods explained.
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 :)Quote:
I thought it would be nice idea to have some sort of animation which would poke out from everwhere RANDOMLY