Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trapping local Escape key for automation servers
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00423422
Message ID:
00423741
Views:
18
This command (CreateObjectEx) is not interruptable by user events. When you want to hide message that appears when user press keys, use following properties:

_VFP.OLEServerBusyRaiseError
_VFP.OLERequestPendingTimeout
_VFP.OLEServerBusyTimeout

Hope this helps.


>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
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform