Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reaction on Escape
Message
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00352415
Message ID:
00352452
Views:
13
Mark,

I tried this, but there is a problem:
On my form I have commandbutton, which runs the long process. It invokes program (prg) execution.
I tried on escape thisform.StopProcess
and in this method just set some variable to true to indicate the stop of my process. However, it gives me an error: 'Thisform could be called only if form methods...'.

So, I can not use this technique...

I tried inkey(). It works, but unfortunatelly it shows the Enter sign and, perhaps, wait users input, which is not good either...

What else could you suggest?

TIA

>SET ESCAPE ON
>ON ESCAPE DO MyEscapeCode
>
>>Hi everybody,
>>
>>I have my form running some process and it also shows Progress bar.
>>It does scan .. endscan and update Progress bar info each 100 records.
>>I want to have ability to stop this process by Escape.
>>
>>When I do it, it shows VFP message 'Interrupted...'
>>I want to change this behavior, so I put set escape off
>>and inside my scan
>>if lastkey()=27
>> exit
>>endif
>>
>>I don't see any reaction... The process still continues to execute.
>>What should I do?
>>
>>TIA
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform