Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Continuous Loop
Message
 
À
15/12/2005 08:54:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01078192
Message ID:
01078194
Vues:
24
>I'm having trouble doing something pretty basic:
>
>I want to have a form with two buttons on it: Start and Stop
>
>When one pushes 'Start', a background process starts that performs a continuous loop, looking for files in a particular directory, and copying them to another if they exist. In order to stop this sentinel process, one would press 'stop'.
>
>However I write the code, the focus seems to remain with the background endless loop, and I can't get the 'stop' button to work.


Change the loop to be like this:
thisform.EndlesLoop = .f.
DO WHILE thisform.EndlesLoop
   .......
   DOEVENTS FORCE
ENDDO
In your Stop button:
thisform.EndlesLoop = .f.
(not tested)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform