>Hi all ...
>
>I'm looking for a way of calculating the time a PC has been left idle (ie no keyboard / mouse action) in a VFP 8.0 environment. I'm sure is probably easily acheived, but just wondered if someone could give me a quick fix.
Set each of your forms to have keypreview=.t., and have a bit of code which will call something in your application object.
Your app object can use seconds() to store the time of last call, and on each call compare that stored time with the current time, do something with the difference (save in a table?), store current time in the property and so on. I think this is simpler than the timers.
The problem is more in the area of what counts as an user interaction - each click, unregistered clicks or keypresses that end a wait command, responses to messagebox()... even responses to the file selector when it appears. I.e. it's easy to do for your forms, even menus, but it's hard to cover all the possible cases.