|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Any "quirsk" with the timer controlFolks
I'm putting a timer on the main form of my utility. Are there any quirks I should know about? I ask because there is an interesting quirk with the timer event in Access that developers need to know about. Tony -- Tony Toews, Microsoft Access MVP Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/ For a convenient utility to keep your users FEs and other files updated see http://www.autofeupdater.com/ On Sun, 05 Sep 2010 12:51:33 -0600, Tony Toews
<tto***@telusplanet.net> wrote: >Folks Ha, yes there are many "quirks" with a timer.> >I'm putting a timer on the main form of my utility. Are there any >quirks I should know about? > >I ask because there is an interesting quirk with the timer event in >Access that developers need to know about. > Most deal with whether a timer will fire or not (blocked) in the IDE or at Runtime. It also depends on what "timer" you are using: The Timer control? Something from the WinAPI? Multimedia Timer? ... But you know all this, so what are you 'really' asking? -ralph On Sun, 05 Sep 2010 14:01:53 -0500, ralph <nt_consultin***@yahoo.net>
wrote: >>I'm putting a timer on the main form of my utility. Are there any Sorry, the timer control. It seems to be working so far in the IDE>>quirks I should know about? >> >>I ask because there is an interesting quirk with the timer event in >>Access that developers need to know about. >> > >Ha, yes there are many "quirks" with a timer. > >Most deal with whether a timer will fire or not (blocked) in the IDE >or at Runtime. It also depends on what "timer" you are using: The >Timer control? Something from the WinAPI? Multimedia Timer? ... and not causing any troubles, yet, with the Glow Button sublassing. >But you know all this, so what are you 'really' asking? No, I don't know the quirks with the Timer control in VB6.Tony -- Tony Toews, Microsoft Access MVP Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/ For a convenient utility to keep your users FEs and other files updated see http://www.autofeupdater.com/ On Sun, 05 Sep 2010 13:08:37 -0600, Tony Toews
<tto***@telusplanet.net> wrote: > I'm so used to seeing your name, just assumed you were a long-time>Sorry, the timer control. It seems to be working so far in the IDE >and not causing any troubles, yet, with the Glow Button sublassing. > >>But you know all this, so what are you 'really' asking? > >No, I don't know the quirks with the Timer control in VB6. > VBer, so actually that was a complement, not a derision or jeer. <g> Any quirks will be related to using a control vs. the API (including the WinAPI, or any other API), handling Events in general, and whether you are using more than one. As for the Timer control, it is not very precise. (Well actually neither is the WinAPI, though at a slightly better level of precision.) So depending on your interveral, it may or may not meet your requirements. For example: While the Timer control lets you set any interval from "1" on ... in fact the best it can ever do is 55ms. Plus consider the Event is queued - so it also depends on someone being able to act when it does go off. WinAPI timers in theory can do better, 12-60ms (depending on the O/S) and IIRC the hardware. Sounds better but note it actually delivers a 'range' of possiblities - so you may be more 'precise' but less accurate over-all. For events in general - Kevin posted this a while back in response to a WithEvents question. http://vb.mvps.org/samples/SyncEvts/ It is worth a look. Particularily the article where he provides a little chart rating performance and pointing out where events might get blocked. If you are using more than one - I always offer this truism from the 18th century - Never go to sea with two clocks. Take one or Three, never two. <g> That should help you be prepared for any 'quirks' that may appear. -ralph "ralph" <nt_consultin***@yahoo.net> wrote in message He's a long time Accesser who finally putting that VBA to the use for which news:gfu7861s7qi1p4ag7vu7r8ps6rkq2vgrf2@4ax.com... : On Sun, 05 Sep 2010 13:08:37 -0600, Tony Toews : <tto***@telusplanet.net> wrote: : : I'm so used to seeing your name, just assumed you were a long-time : VBer, so actually that was a complement, not a derision or jeer. <g> it was intended. <g> On Sun, 5 Sep 2010 19:47:17 -0400, "Kevin Provance" <k@p.c> wrote: HAHAHAHAHA>: I'm so used to seeing your name, just assumed you were a long-time >: VBer, so actually that was a complement, not a derision or jeer. <g> > >He's a long time Accesser who finally putting that VBA to the use for which >it was intended. <g> Good one! Tony -- Tony Toews, Microsoft Access MVP Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/ For a convenient utility to keep your users FEs and other files updated see http://www.autofeupdater.com/ On Sun, 05 Sep 2010 15:47:28 -0500, ralph <nt_consultin***@yahoo.net>
wrote: >>Sorry, the timer control. It seems to be working so far in the IDE Thanks. I was thinking later I should've replied that I've been>>and not causing any troubles, yet, with the Glow Button sublassing. >> >>>But you know all this, so what are you 'really' asking? >> >>No, I don't know the quirks with the Timer control in VB6. > >I'm so used to seeing your name, just assumed you were a long-time >VBer, so actually that was a complement, not a derision or jeer. <g> working with Access for 15+ years but dabbling in VB6 for the last 10 years. I've only gotten serious with VB6 this last year. >Any quirks will be related to using a control vs. the API (including I have one event firing every 60 seconds which sends a query to an>the WinAPI, or any other API), handling Events in general, and whether >you are using more than one. Access MDB file. It should return usually 0 records but sometimes a few records such as 1, 2, 5 or 20 records. If non zero I "turn a graphic red" on the form. The timer control seems to be doing all that I need it to do. >For events in general - Kevin posted this a while back in response to Hmm, service unavailable. Karl, Karl!!! He likely won't read this>a WithEvents question. >http://vb.mvps.org/samples/SyncEvts/ >It is worth a look. Particularily the article where he provides a >little chart rating performance and pointing out where events might >get blocked. until Tuesday but that's fine. >If you are using more than one - I always offer this truism from the Hehehe>18th century - Never go to sea with two clocks. Take one or Three, >never two. <g> >That should help you be prepared for any 'quirks' that may appear. Ok, if those are all the known quirks then I'm happy.Thanks, Tony -- Tony Toews, Microsoft Access MVP Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/ For a convenient utility to keep your users FEs and other files updated see http://www.autofeupdater.com/ Tony Toews has brought this to us :
>> For events in general - Kevin posted this a while back in response to That server does an internal reset every couple hours. Usually takes >> a WithEvents question. >> http://vb.mvps.org/samples/SyncEvts/ >> It is worth a look. Particularily the article where he provides a >> little chart rating performance and pointing out where events might >> get blocked. > > Hmm, service unavailable. Karl, Karl!!! 1-2 minutes, max. Wish I had a better answer to a highly persistent memory leak, but for now that's it. :-( > He likely won't read this You know me way too well! <g>> until Tuesday but that's fine. "ralph" <nt_consultin***@yahoo.net> wrote in message That was in Win 98. Its actually typically about 16 milliseconds in XP, news:gfu7861s7qi1p4ag7vu7r8ps6rkq2vgrf2@4ax.com... > On Sun, 05 Sep 2010 13:08:37 -0600, Tony Toews > For example: While the Timer control lets you set any > interval from "1" on ... in fact the best it can ever do > is 55ms. Vista etc. Mike On Mon, 6 Sep 2010 16:48:04 +0100, "Mike Williams"
<M***@WhiskyAndCoke.com> wrote: >"ralph" <nt_consultin***@yahoo.net> wrote in message Thanks for that correction.>news:gfu7861s7qi1p4ag7vu7r8ps6rkq2vgrf2@4ax.com... >> On Sun, 05 Sep 2010 13:08:37 -0600, Tony Toews > >> For example: While the Timer control lets you set any >> interval from "1" on ... in fact the best it can ever do >> is 55ms. > >That was in Win 98. Its actually typically about 16 milliseconds in XP, >Vista etc. > -ralph "Tony Toews" <tto***@telusplanet.net> wrote in message In general, it's not the most efficent utility if timing is of the essence news:3hp786t0m7lmiprbnvfeo84n79g20h80qo@4ax.com... : Folks : : I'm putting a timer on the main form of my utility. Are there any : quirks I should know about? : : I ask because there is an interesting quirk with the timer event in : Access that developers need to know about. (as ironic as that is). It all depends on what you are attempting to accomplish. I use timers to fire off events that might come in handy when I need something run, but not necessarily in the thread of execution (a poor mans phony multi-thread solution). What are you using your timer for? I thought I saw something about a glow button (we can have the talk about bad UI choices later). If you are using a timer to trip the glow, then don't. Use TrackMouseEvent. On Sun, 5 Sep 2010 20:03:10 -0400, "Kevin Provance" <k@p.c> wrote: Not at all. I just want to check a log database every minute to see>What are you using your timer for? if there are any uacknowledged records in the errors table. >I thought I saw something about a glow What about bad UI choices? Note that you can see what I've got so far>button (we can have the talk about bad UI choices later). at http://www.autofeupdater.com/ Note the greatest of buttons but they'll do for what I need. Tony -- Tony Toews, Microsoft Access MVP Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/ For a convenient utility to keep your users FEs and other files updated see http://www.autofeupdater.com/ In the VB IDE, Timer events will NOT fire in the presence of modal or
MsgBoxes. In the EXE, they do. I am not sure about Access, perhaps in Access Timer events don't fire when a MsgBox is shown because in Access you are always running in the IDE. PRB: Events Occur in EXE While a Message Box Is Displayed http://support.microsoft.com/kb/178078 On Sun, 5 Sep 2010 22:28:13 -0400, "Nobody" <nob***@nobody.com> wrote: Ah, ok. No problem either way then. I also have the database reads>In the VB IDE, Timer events will NOT fire in the presence of modal or >MsgBoxes. In the EXE, they do. happening in the form Activate event so that is covered when the modal form or msg box is responded too. > I am not sure about Access, perhaps in Access No idea as to if that quirk exists in Access.>Timer events don't fire when a MsgBox is shown because in Access you are >always running in the IDE. What we did find in Access is if the dev has an open form with a timer running and they're in the VBA editor the Intellisense code would automatically complete when the timer hit. Rather annoying if frequent enough. Very puzzling if not very frequent. This would never happen in VB of course. Tony -- Tony Toews, Microsoft Access MVP Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/ For a convenient utility to keep your users FEs and other files updated see http://www.autofeupdater.com/ Tony Toews wrote:
> Folks One superstition many VBers (including me) practice is putting> > I'm putting a timer on the main form of my utility. Are there any > quirks I should know about? > > I ask because there is an interesting quirk with the timer event in > Access that developers need to know about. > Timer1.Enabled = False in the Form_Unload event. Jason Keats wrote:
> Tony Toews wrote: Surely you put it in _QueryUnload?>> Folks >> >> I'm putting a timer on the main form of my utility. Are there any >> quirks I should know about? >> >> I ask because there is an interesting quirk with the timer event in >> Access that developers need to know about. >> > > One superstition many VBers (including me) practice is putting > Timer1.Enabled = False in the Form_Unload event. And you call yourself superstitious (-: Jim Mack wrote:
Show quoteHide quote > Jason Keats wrote: Well, it has worked for me (knock on wood). So, I'd better keep doing it >> Tony Toews wrote: >>> Folks >>> >>> I'm putting a timer on the main form of my utility. Are there any >>> quirks I should know about? >>> >>> I ask because there is an interesting quirk with the timer event in >>> Access that developers need to know about. >>> >> >> One superstition many VBers (including me) practice is putting >> Timer1.Enabled = False in the Form_Unload event. > > Surely you put it in _QueryUnload? > > And you call yourself superstitious (-: > my way (fingers crossed). :-)
DLL fight
What Is the User Path for Deployment Similar to $(AppPath)? Looking for VC6 newsgroup Error 481 Invalid picture Global class and WithEvents Distibution of VB6 program Closing Grouped instances in the taskbar Componenet not installed correctly by PDW Error 5: ERROR_ACCESS_DENIED when accessing registry in Windows 7 Calling function pointers |
|||||||||||||||||||||||