Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Events not firing
Message
 
 
À
24/10/1998 01:19:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00150097
Message ID:
00150184
Vues:
15
Geoff,

In addition to Josh's recommendation to put a DoEvents in the loop. I'd suggest you get rid of that high processor use loop entirely.

Just us a polling timer that checks every couple of seconds to see if the process is done. It may want to issue a DoEvents but it probably wouldn't be necessary.

WAIT, INKEY() and DOEVENTS() all basically allow the VFP event loop a chance to process events.

>In test 1:
>thisform.timer1.interval = 1000
>thisform.timer1.enabled = .t.
>thisform.fbusy = .t.
>do while thisform.fbusy = .t.
>enddo
>thisform.label1.caption = "Something else"
>
>In the timer event;
>thisform.fbusy = .f
>In test2, same code, but new caption
>Run the form and the timer does not fire. Put a wait timeout .5 in the do while, and it works fine.
>The wait is ugly, it flashes on the screen or scribbles on the window.
>It obviously needs something in the loop which provides a time interval for the other events to fire. Are there any other options?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform