Hi,
I would like to know how cam i go faster than 1 interval?
Timer2.Enabled = True
Timer2.Start()
Timer2.Interval = 1
thanks
Printable View
Hi,
I would like to know how cam i go faster than 1 interval?
Timer2.Enabled = True
Timer2.Start()
Timer2.Interval = 1
thanks
You cant, not using timers anyways.
If I remember rightly the timer control isnt accurate enough to actually run at 1ms anyways.
You will need to use somthing like System.Environment.TickCount and generate your own timer.
Pino
I can use do ... loop too right?
Yes you can use a Do Loop but code execution is just done as fast as it can not at set intervals.
What are your trying to do? You can only go as fast as the computer.
Pino
Correct, the Do...Loop will run as fast as possible (a function of the code you put into the loop and a function of the speed of your system), however you are not in control of that speed.
I still remember old games that were build on Do..Loops, which I did run on newer systems, and I couldn't see anything animation just because it was running so fast.
You do know that 1 'interval' is one millisecond, correct?
In addition, the timer will not run that fast: maybe 20 to 50 ms or so at the fastest. The forms based timer is designed for longer timing periods, not such relatively high speed timing.
(Even so, it's not possible to run anything faster than 1ms - even if you could establish a 1ms interval...at this point you require additional hardware and a buffering mechanism. Depending on what you are trying to do, of course...)