Information générale
Catégorie:
Codage, syntaxe et commandes
>Does anyone know of a way to make Visual FoxPro release control to the operating system in the middle of a section of code, so that in can process whatever is in its event queue?
>
>I believe the "DoEvents" command in Visual Basic accomplishes this, but I have been unable to find a way in Visual Foxpro, other than the rather cumbersome method of ending the section of code, and creating a timer (set to a bare minimum interval) to pick up processing again. This may sound easy, but it means having to move my code around in a very non-intuitive way and is fairly painful.
>
>Thank you in advance.
Although I have not found a documentation to support it, I have had some success with =INKEY(.5). I am running this resource PIG executable called DataVision to talk to a network controller. (I know, there are better ways, but the company had already bought this thing so I have to live with it.) When I start this program the resource meter (Windows 3.11) goes immediately to 100% no matter what it is doing. And you should see it complain when another program wants to do something with the processor. I was getting a timeout error when I ran some complicated reports so I put an =INKEY(.5) in the init method of the cursors. This solved the problem so maybe it will work for you too.
See ya
Dean Parkinson
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement