Drew Wutka
DWUTKA at Marlow.com
Mon Dec 17 14:51:01 CST 2007
True, however, my system doesn't do anything when Access isn't being used. So, if you're user is going through email for 30 minutes, with an 'inactive' sensitive database open in the background, the entire time the db is open, it is continuously checking the active form and active control. My code, on the other hand, is going to do nothing while they are not using it. Now, the inactivity timer itself...well, that will just check a date. Not saying my method (which, by the way, I have never used, because I don't create Access Front End's very often) is some stellar approach. But it is light weight, and much truer towards detecting inactivity. (keep in mind, Access has reports, queries and tables, the active form isn't going to detect that) Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert Sent: Monday, December 17, 2007 1:27 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] shutting down It certainly shows that you have an excellent command of the Windows API, but I would not say that it does anything more than the M$ solution of checking Screen.ActiveControl and Screen.ActiveForm: other that noticing when the user just waves the mouse around without selecting anything with it, and also acknowledging that your method will work in a non-access situation. Back in Access land, when you know that you are about to run a long process that might fall foul of either method of detecting "inactivity" the solution is very simple: set the monitoring form's Timer event value to zero, which puts the timer event to sleep. When the long process is completed, reset the form's timer event to however many milliseconds is desired. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Monday, December 17, 2007 2:19 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] shutting down It captures all mouse and keyboard events.... know of any other user actions in an Access Application? It, of course, wouldn't immediate know if a VERY long process was running, but that would merely be a matter of setting another flag for processes known to take the length of time you set your inactivity timer too. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Monday, December 17, 2007 1:05 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] shutting down Any actions that fall through the cracks? Susan H. > Yes, it's calling a function...actually, a callback function...but as > far as overhead...unless you were using a 1 mhz machine, it won't be > noticeable. It's using a Hook. The OS has several processes that you > can 'hook' into. For example, you can hook into the file system, so you > can be alerted to whenever a file is read, written too, created, etc. > That's how 'live' virus scanning programs work. > > At the core level, these mouse and keyboard events are how Access knows > you are moving the mouse, or pressing a key. This code 'piggy backs' on > that process. > > Drew > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins > Sent: Monday, December 17, 2007 12:41 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] shutting down > > Okay, it looks pretty good -- it considers every keystroke and mouse > click or mouse movement? Is it going to slow things down the way a > bunch of keypress events would? I'm not sure what's happening here -- > is this actually calling a function with each key or mouse movement > because I don't > actually see that happening. Can you explain how this works? > > Susan H. > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com