-
Im looking for a way to increment a variable at a constant rate according to how long the program has been running, i know it must be possible to access the clock or possibly a thread like in java but i have no idea how
specifically, im trying to move from one position in an array to the next each second or less( strange i know but theres a purpose) but it needs to affect the position of a picture as well, problably thru
pic1.left = xpos(i)
pic1.top = ypos(j)
or similar
any help on this would be appreciated
-
Can you use a Timer control for this?
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company
-
well as mark said , u must use a timer control here is some code :
Private Sub Form_Load()
Timer1.Interval = 1000 ' set the timer interval in milliseconds which means each 1000milliseconds ( 1 second) the sub timer1_timer will be accessed
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
Static x As Long
x = x + 1
Text1 = x
' pretty straight forward
End Sub
- regards -
- razzaj -