Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Do command as navigating in a grid
Message
From
24/07/2008 17:25:52
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01333691
Message ID:
01333913
Views:
9
This message has been marked as a message which has helped to the initial question of the thread.
>The timer will have a code to replace record as read if I stay more than 20 seconds on it
>
>replace email.read with .t.
>
>Can I use only AfterRowColChange ?
>
>Because I need to start and then stop the timer

You can have a property on the grid which would hold the time when you arrived at the record. Something like this:
* AfterRowColChange 

ltNow=datetime()
if ltNow - this.tStartedLooking>1200 && 20*60
   replace messages.read with .t.
endif
this.tStartedLooking=ltNow
There must be a downside to this, seems too simple (not checking whether the 20 minutes are actually spent with this form on top comes to mind, there may be other gotchas). Generally, if I need to know the time between two events that I can catch, I don't use a timer. Timer is for creating an event at a certain time (or at certain times), or for delayed action, not as good for catching whether (or when) something happened.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform