Re: do pop up boxes stop all events?



<tadamsmar@xxxxxxxxx> wrote in message news:1190234624.352486.13100@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
From some experiments, I found that timers are not really
reliable in that a 10 ms interval timer does not try to maintain
a 100 hertz rate. I think it just gets requeued 10 ms after it
runs, or something like that.

You can show this in a simple test app
in Load:
cnt = Timer()*1000 'Number of milliseconds since mignight
Text1.Text = 0
And in the timer event:
cnt = cnt + Timer1.Interval
Text1.Text = clng (cnt - Timer()*1000)
Text1 will show an increasing negative value.

Have a look at what I said in an earlier response in this thread. The VB Timer Control simply cannot produce a 100 Hz frequency on many systems. It's not a problem with VB itself, but rather with the underlying OS timing mechanism that it relies on. In fact on some systems the best available frequency from it is about 18 Hz! (Win98). And on many XP and Vista systems you cannot get more than about 65 Hz. Also, the intervals themselves are not usually the same each time, especially on XP systems that produce the approximate 65 Hz rate, with some quite wide variations from one interval to the next. If you want better resolution and consistent intervals you would be better off constructing a multimedia timer in code, or using one of the many hires multimedia timers that are available as freeware on various sites, including VBAccelerator.

Mike


.



Relevant Pages

  • Re: do pop up boxes stop all events?
    ... a 100 hertz rate. ... And in the timer event: ... cnt = cnt + Timer1.Interval ... I suspect that it just reschedules with a 10 ...
    (microsoft.public.vb.general.discussion)
  • Re: Flashing labels?
    ... A simple but not so nice code timer event you can try. ... Dim cnt As Integer ... The user should enter information into all of the enabled textboxes before ...
    (microsoft.public.access.formscoding)
  • Re: Is delphi a good introduction to programming?
    ... >Multimedia timer services allow applications to schedule timer events ... These multimedia timer services allow you to schedule timer ... >events at a higher resolution than other timer services. ...
    (comp.lang.pascal.delphi.misc)
  • Re: I need a Class 101 on threading in VB6
    ... The Timer control is a system timer which will both limit it's ... You could try a multimedia timer, which runs in it's own thread. ... etc so will crash the IDE). ...
    (microsoft.public.vb.general.discussion)
  • Re: do pop up boxes stop all events?
    ... Any Timer event that occurs while a prior event is being serviced is ... been too long since I used VB for any critical servicing more than ... I have my app working with a timer in a third form that pushes data ... cnt = cnt + Timer1.Interval ...
    (microsoft.public.vb.general.discussion)