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.