Mark,
Sorry I did not really understand your problem when I first read it please
disregard my other comments.
If this is a web app you can set a timeout(timer) when each page loads and
then use OnMouseMove event to reset the timeout.
In a windows-form app you could probably do a similar thing, create a form
that has the keypreview set to TRUE so all key event for the child controls
are registered with the form. On the form load or form activate start the
timer, in the event handler for keypress and mousemove you can reset the
timer. In the form de-activate (if mdi) stop the timer. Then have all of
your form inherit from this base form, if you want you could also do this
with a class.
In both senarios if the timer runs out you can exit your application.
Dan
<an*******@discussions.microsoft.com> wrote in message
news:0c****************************@phx.gbl...
-----Original Message-----
You could set a timer which gets reset each time the
application doessomething, if it ever reaches the defined interval, then
exit theapplication.
OHM
Is there an easy way to reset the timer whenever the user
does something in the application? I have previously
placed a line of code in each button, menu item, form,
etc. :p But today my applications are too big to do this
(unless I had decided to inherit everything and put code
in the controls themselves).
I could envision setting up something that looks for any
application activity, but most of my applications do
things on their own even when there is no user there.
It would be great if there were an application level
event called 'OnUserInteraction' where you could put
something like this. Does anything like that exist?
Thank you,
Mark Lauser - Crimson Software