Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using timer control to set wait time
Message
De
07/06/2005 11:21:58
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
07/06/2005 11:08:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Novell 6.x
Database:
Visual FoxPro
Divers
Thread ID:
01020947
Message ID:
01020959
Vues:
19
Basically, you need the following for a Timer:

.Enabled = .T. (once the action executes, you can set it back to .F., to avoid the Timer firing again and again).

.Interval = 5 * 60 * 1000 (the example is for 5 minutes)

.Timer() Event: Code for whatever you want to do after 5 minutes.

>I'm trying to use the timer control to make my app wait a specified time before executing code. Specifically, I have a form that users across the country are using to create a file that is stored on a server in a central location (Birmingham, AL). This file has the same name everytime and is stored in the same directory. When the file is written to the server, a process starts that will read the file and delete it. This allows other sites to subsequently submit their files. The problem I have is that multiple sites could submit their file at the same time, so I need to manage this to prevent one site overwriting another site's file before the process deletes it. I had an idea to use the timer control to manage this, but I'm having some problems with the syntax. I'm trying to use the interval property and the timer event method in some combination, but to no avail. Any ideas for the best way to do this would be very much appreciated.
>
>p.s. I've tried using a "looping" structure (FOR... ENDFOR), but this is not ideal because each site has a different response time due to network issues (geographical distance from the server).
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform