Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trapping local Escape key for automation servers
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Trapping local Escape key for automation servers
Divers
Thread ID:
00423422
Message ID:
00423422
Vues:
91
We have an OLE process running via CreateObjectEX().

Some of the processes may take some time and we want to allow users to exit the process via the Escape key. We have controll being returned to the client machine during each sub-step of the process instead of one long delay that may be 10-20 seconds apart (depending). The problem is, when we hit escape and it is in the middle of the remote process, VFP doesn't have control to recognize the escape key and we get the following message from NT, not VFP.

Our process is something like...
llEscapeKeyPressed = .F.
on escape llEscapeKeyPressed = .T.

do while {condition}
   OLEServer.Process( "test" )
   if llEscapeKeyPressed
      {exit condition}
   endif
enddo
"This action cannot be completed because the other program is busy. Chose 'Switch To' to activate the busy program and correct the problem.

With the exception of the escape key trapping, the process works properly. We want to eliminate the above message yet still get control of Escape key.


TIA
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform