Results 1 to 6 of 6

Thread: arrays

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    14

    Angry

    how do you make a set of controls in an array move up on the form using a timer???

  2. #2
    Addicted Member DarkMoose's Avatar
    Join Date
    Jul 2000
    Location
    in a box
    Posts
    185
    Use a for next loop inside the timer, like this:

    Code:
    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...
    To understand recursion, one must first understand the concept of recursion.

  3. #3
    Guest
    Keep in mind that you cannot use "Object" as a variable name as it is already in use by VB.

  4. #4
    Addicted Member DarkMoose's Avatar
    Join Date
    Jul 2000
    Location
    in a box
    Posts
    185
    Oh yes, I did forget to mention to replace object with wutever your control is called, but i'm sure you knew that.
    To understand recursion, one must first understand the concept of recursion.

  5. #5

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    14
    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

  6. #6
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    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
    Sanity is a full time job

    Puh das war harter Stoff!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width