Detect user activity

R

RP

I want to detect user activity (mouse move, key click). For certain
critical areas (Form in my app.), I want to check whether there is any
user activity for a certain interval. If not, then I want to log off
the Form. I don't want to user Timer controls. Is there any build
in .NET class that can do this and return user-activity.
 
M

Matt Lacey

I want to detect user activity (mouse move, key click). For certain
critical areas (Form in my app.), I want to check whether there is any
user activity for a certain interval. If not, then I want to log off
the Form. I don't want to user Timer controls. Is there any build
in .NET class that can do this and return user-activity.

I'm not aware of anything specifically for this, but it should be
quite easy to do yourself. Just intercept all key presses by using the
keypreview setting for the form plus the mouse events. If these are
triggered when a global flag indicates the restricted period, do the
required logging.
 

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