Click to See Complete Forum and Search --> : arrays
Silvertine
Nov 14th, 2000, 07:15 PM
how do you make a set of controls in an array move up on the form using a timer??? :confused::eek::mad:
DarkMoose
Nov 14th, 2000, 07:59 PM
Use a for next loop inside the timer, like this:
For MovePicz = 0 to 9
Object(MovePicz).Top = Object(MovePicz).Top - 5
Next MovePicz
Obviously, change the numbers around to whatever fits your program. And, BTW...Timerz are evil k tnx >;) I won't start telling you to go and use Loops for your entire game thou, I mean you gotta start at the beginning, right!? I remember the good ol' dayz when I used 50 picture boxes and a few timerz...
Keep in mind that you cannot use "Object" as a variable name as it is already in use by VB.
DarkMoose
Nov 15th, 2000, 04:47 PM
Oh yes, I did forget to mention to replace object with wutever your control is called, but i'm sure you knew that.
Silvertine
Nov 15th, 2000, 05:49 PM
what do you suggest i use instead of timers? i tried gettickcount but i dont get it. explain please :)
timers work fine for me except when ineed to to somthing fast :(
/\/\isanThr0p
Nov 17th, 2000, 10:18 AM
you got to do a loop like
dim wait as long
do
and just put the code in here if you want to use gettickcount then just put a var
if wait < gettickcount then
code here
wait = gettickcount +the time you want to wait
endif
loop while exit =false
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.