By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,508 Members | 1,856 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,508 IT Pros & Developers. It's quick & easy.

Detect user activity

P: n/a
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.

Sep 20 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On 20 Sep, 10:39, RP <rpk.gene...@gmail.comwrote:
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.

Sep 20 '07 #2

P: n/a
This is not precisely what you're looking for, but very similar:

http://www.geekpedia.com/tutorial210...nput-Time.html

It will retrieve the idle time and last input time, but operating
system-wise instead of form-wise.

"RP" <rp*********@gmail.comwrote in message
news:11********************@e34g2000pro.googlegrou ps.com...
>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.
Sep 20 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.