Monitoring user activity in my application, logging out if idle

C

Claire

Hi
I would like to un-log users and return them back to the main screen of my
application automatically if user activity (key presses/mouse) goes idle
after a certain length of time.
My main screen already closes any sub forms if a user login card is removed
from a card reader, but I need the same for when an administrative user logs
in with userid/password entry and doesnt use it for some time.
How should I handle this please (something that won't annoy vista). Is there
a central simple-ish method that doesnt involve me coding every form in the
application for mouse/key?

thank you
 
I

Ignacio Machin ( .NET/ C# MVP )

Hi
I would like to un-log users and return them back to the main screen of my
application automatically if user activity (key presses/mouse) goes idle
after a certain length of time.
My main screen already closes any sub forms if a user login card is removed
from a card reader, but I need the same for when an administrative user logs
in with  userid/password entry and doesnt use it for some time.
How should I handle this please (something that won't annoy vista). Is there
a central simple-ish method that doesnt involve me coding every form in the
application for mouse/key?

thank you

Hi,

You would have to leave manage land to do this I think.
I could think of two ways, one is to write a system hook and reset a
timer each time you receive an event.
The other might be to know if windows provides such a feature , I
think it does as something like this is what the screen saver have to
use, so you better check in a win32 NG too
 
M

Michael Justin

Claire said:
How should I handle this please (something that won't annoy vista). Is
there a central simple-ish method that doesnt involve me coding every
form in the application for mouse/key?

You have to implement it only one time for your own customized Form
class, and then make all application forms subclasses of this class?

Hope this helps(tm)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top