If it was me, I would implement a timer and use a Win32API call.

Depending on the value of the auto-save, would dictate the interval 
of the timer, i.e., autosave after 5 mintues, then make your timer 5 
minutes long.

Then, you can use the Win32API GetLastInputInfo() function to tell 
you if any input (mouse or keyboard event) has occurred since the 
last time you checked it. Although I've not tried this in VFP, it 
should work. Here's the link: 
http://msdn.microsoft.com/en-us/library/ms646302%28VS.85%29.aspx

The only hard part is if you've never worked with win32api before in vfp.

-Steve




At 12:22 PM 09/08/2010, you wrote:
>One of my older clients (7 years ago!  And that app is still kicking ass
>for them!  haha) has requested that I change their app to auto-save
>based on activity/inactivity.  Does this mean that in my entry controls
>like textbox, editbox, checkbox I put code in the KeyPress to update the
>form's custom "LastHit" property with the current date/time stamp and
>key off of that for logic to save and/or kick them out (due to
>inactivity)?  Could add code in the button's GotFocus event too I guess.
>
>Ideas?
>
>tia,
>--Mike
>
>--
>Mike Babcock, MCP
>MB Software Solutions, LLC
>President, Chief Software Architect
>http://mbsoftwaresolutions.com
>http://fabmate.com
>http://twitter.com/mbabcock16
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to