Check out Thread #
692237, this should give you some ideas.
>Looking for a way to determine how long since the User has moved the mouse or used the keyboard globally regardless of whether he is in vfp's main _screen, or in specific forms, menues....
>
>I need this information to timeout the user's last login, and Force a new Login. Any user activity needs to reset time timer.
>
>I can't see how a single timer on one form can do this in a global fashion. Maybe asking for a new command such as SECONDS_SINCE_INPUT() (in vfp10 ?) would be appropriate.