Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Interrupt a process with a click
Message
De
01/07/1999 16:19:21
 
 
À
01/07/1999 16:02:05
Allen Hanna
H. A. Hanna Associates
Indianola, Indiana, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00236671
Message ID:
00236688
Vues:
15
Insert a DoEvent() in your loop instead of your Inkey(). For faster performance, do not call this function on every loop:
IF Mod(Counter, 100) = 0
   DoEvent()
ENDIF
HTH

>I have a form with START and STOP buttons. Processing is performed in a Do While loop in the Click() method of the START button. I'd like the STOP button to respond immediately to the user's click (it's a graphic radio button) with a "please wait message" and processing to terminate at the next safe opportunity. The problem is, while the processing is going on the form is not responding to input. I'm currently using an INKEY() within the processing loop to check the keyboard but it's sort of a kludge and there is no immediate feedback to the user to let him or her know the request has been acknowledged. Is there a nicer approach for allowing a button to interrupt a process? (I have to keep VFP5 and VFP6 compatibility.)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform