Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to find an intermittent problem (VFP 7)
Message
From
23/01/2004 11:47:37
 
 
To
23/01/2004 11:13:22
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00869649
Message ID:
00869932
Views:
12
I don't have an example for you but I can give you an overview of how to use them...its fairly easy, but there are some subtleties that could cause you some grief if you don't know about them.

Try dropping a native VFP timer control onto a form. Also drop a text box onto the form. Put the following code into the timer's Timer Event:
Thisform.text1.Value=TIME()
Finally, set the Timer's interval property to 1000. Now, run the form. You should see the the current time appear in the text box. The timer updates the value of the text box approximately every second.

Some things you should be aware of:
1. the Interval property is the number of milliseconds (not seconds) that elapse between Timer Event firings.

2. The timer may not fire in exact increments of time.

3. The timer event will not fire immediately upon setting the interval property. If you set the interval to 5000, the first firing of the timer event will be 5 seconds after setting the interval.

4. If the code in your timer event takes longer to run than the interval you've set, the timer event will still fire once for every single interval - think of it as piling up the overdue Timer Events and processing them one after another.

5. Setting the interval to 0 will turn off the timer. You can use a command button to toggle the interval to turn the timer on and off.

In your case, you can use the timer event to do the typical steps a user would do. Set the timer's interval to a reasonable amount of time no shorter than the time to process your timer event code. Then, sit back with a sandwich while your timer does all the work for you.
Previous
Reply
Map
View

Click here to load this message in the networking platform