Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Timer on form quits working

Status
Not open for further replies.

vbajock

Programmer
Jun 8, 2001
1,921
US
I have had a problem where the timer event just seems to quit working. It seems to happen on a form that gets a lot of code mods, after so many mods the timer just quits working. If anyone else has experienced this bug or knows the cause please let me know.
 
Is the timer event not working, or are you not providing the application the opportunity to handle the event?

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
I guess I don't understand what you mean. The app only consists of one form, which runs a timer event, on a 2000 server. The only thing it does is check for a file. Ontimer is activated, a value is set. When the form is opened, the timer fires once, then it never fires again.
 
I'm sorry, but I'm a bit confused now.

In the original post, you stated: "It seems to happen on a form that gets a lot of code mods, after so many mods the timer just quits working". And your recent post, "consists of one form, which runs a timer event ... only thing it does is check for a file".

Can you post the Timer Event handler? What does the program do is the check fails?, check suceeds?

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Private Sub Form_Timer()
Stop
Call Autoload
End Sub

Never hits the stop statement. Timer event no longer fires
 
I understand that, but what happens in Autoload?

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
It doesn't matter, man. The question is why the timer event no longer fires. If the code looks like this:

Private Sub Form_Timer()

Stop

End Sub

it never hits the stop.

My question is: what could make the timer event quit working ? Why isn't the event firing in the first place?
It's obviously not a code problem, because the code never executes.

 
Two different questions. Why isn't the event firing in the first place? Invalid TimerInterval is the first thought that comes to mind.

But the other question, what could make the timer quit working could be any one of a number of things, not the least of which is processor bound activity inside of the Autoload function which prevents the timer event from being processed.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Interval is set to 50,000, valid values are 1 to 65,something. Timer never fires in the first place, so I don't think there is any type of processor issue.
 
That is strange. Try setting the TimerInterval property in the Form_Load event.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top