|
-
Nov 30th, 1999, 09:27 AM
#1
Thread Starter
Member
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
-
Nov 30th, 1999, 04:08 PM
#2
Frenzied Member
Can you use a Timer control for this?
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company
-
Nov 30th, 1999, 04:28 PM
#3
Hyperactive Member
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 -
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|