Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
PAUSE in VFP5
Message
De
29/09/1998 20:46:35
 
 
À
28/09/1998 22:04:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00141705
Message ID:
00142200
Vues:
32
>It is case sensitive. I just typed it in and tryed it
>*---------------------------------
>Declare Sleep in Win32API Integer
>=Sleep(100)
>*---------------------------------
>
>Charles
>
>>>You could use the Sleep API
>>>
>>>DECLARE Sleep IN WIN32API INTEGER
>>>


Chuck,

further to my testing:
The sleep API puts a thread to sleep for the specified miliseconds. My problem is this:

My app uses a timer to poll some hardware connected to the com port continuously! Since this polling needs to wait for a reply from the hardware, I need a wait or pause in the polling loop. If data is returned then I break the loop and update the screen. Then the timer fires and I poll again. This is in real time.

While all this is going on other timers are firing doing other things and users can enter data or requested input on forms. The "poll" timer just updates one label on the screen.

PROBLEM with Sleep API is it puts ALL the processes to sleep for the period specified not only the poll loop it is called in. I tried this with a form with 2 timers, one having a sleep in its Timer event. When this timer fired VFP went to sleep!!!

So this will not do.

I need a statement like PAUSE or some such to work.

I tried INKEY(.3,"H") but this can be interrupted with keystrokes and still eats keys.

Any other ideas??

Bernard
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform