home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 10,346 of 10,840   
   Max to All   
   Timer Events   
   01 Jan 07 23:19:05   
   
   From: nospam@spamcatchers.com   
      
   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   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca