-----Original Message----- From: KcW To: PICLIST@MITVMA.MIT.EDU Date: Wednesday, 15 October 1997 1:33 Subject: [OT] VB3 or Does Anyone Really Know What Time It Is? >Here's a problem and fix I ran into writing a control package (yes, with a >PIC) with VB3 in Win3.11. I set up a couple of timer controls to perform >some scheduled events. Sometimes it worked, sometimes it didn't. OK, try >this: create a form with a control group of 10 timers with an interval of >100ms. Add a control group of 10 labels. In the timer events have each time >update a count in it's own label everytime the timer event occurs. When you >run the program you might expect all the counts to be reasonably close. >Such is not the case. My problem, as illustrated, is that Windows places a >low priority on timers and, as such, they are not necessarily serviced all >the time. The result is what you saw, some timers are serviced consistently >and some not often at all. OK, so what to do? This is where the good folks >at DesaWare come in. The have a high priority timer control that, when used >in the demo above, are serviced regularily and all counts match. You are >not limited to 10 timers either. Thanks DesaWare! The moral: use the >DesaWare timer or don't use a lot of timer controls in your apps. Note that >this is not an issue in Win95 or NT. > Alternatively, use the multimedia timers for better resolution and priority. I don't know how you get to them from VB though - I'm using C++, but the problem with WM_TIMER messages is there too. MikeS