-
Hi,
I am having a crazy problem in VB 5.0. I have a timer in a form where the interval is set to 60000. But for some reason the timer event for the control is not firing. This is happening at random. What could be the reason or what should I do to avoid this problem? This is very urgent.
Thanks
Paul
-
Are you waiting long enough to check if it is firing? 60000=roughly 1 min
-
Is there code in your app that is setting the enabled property of the Timer to false, and then not setting it back to true as needed?
-
The timer control doesnt handle things around 60,000 very well.
Keep the interval low, it will also make it more accurate.
Also try code like this :
Code:
Option Explicit
Dim elapsed As Long
Private Sub Form_Load()
Timer1.Interval = 1000
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
elapsed = elapsed + 1
If (elapsed = 60) Then
elapsed = 0
MsgBox "siajdaoi"
End If
End Sub
Let me know if that works.
- jamie