This may be an elementary question but it's something I have not encountered
in about 10 years writing code in VB 5 / 6
I have a timer that using the API checks if there has been a change to one
of several watched directories in the file system, if there has been a
change a rather long running process is started.
The long running process loops through all files comparing the last modified
attributes on each to those in the database if there is a change the
database is updated.
Simple so far right ?
Just prior to the loop statement in that routine there is a DoEvents to keep
everything ticking along, however something interesting happens.
I have another timer on a very short interval watching for something else to
happen. This something else is unrelated to the file system, it is updating
the status of an out of process com component.
This second timer is not firing while the long running process is taking
place, the do events is working because the status of the long running
process is updated in the status bar of the application and that works.
Is there a rule that I have missed that says only one timer event can be
running at any one time ?
Come to think of it over the years I have only ever put very short routines
in timers so have never faced such a problem.
I can think of a few ways to get around this but am wondering if you agree
with my reasoning?
All the best for the new year
Max