|
-
Feb 23rd, 2001, 09:58 AM
#1
Thread Starter
New Member
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
-
Feb 23rd, 2001, 10:03 AM
#2
Junior Member
Are you waiting long enough to check if it is firing? 60000=roughly 1 min
-
Feb 23rd, 2001, 10:21 AM
#3
Fanatic Member
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?
-
Feb 23rd, 2001, 10:22 AM
#4
Retired VBF Adm1nistrator
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
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
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
|