Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Give user to control/quit a looping process
Message
 
To
19/02/1999 02:47:46
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00189066
Message ID:
00189259
Views:
19
>The idea of making one of button's Cancel property to true,... I've been thinking about it,
>But I've made prediction that it would Release the form,... so I've been trying
>the opposite way,..

Setting a button's Cancel property to true doesn't make it Release the form. It only makes the button respond to the Escape key. The only way the button will close the form is if you set its TerminateRead property to .T., or put THISFORM.Release in its Click event code. (Or if it's based on a class with either of those conditions set and not overridden, of course.)

>I set the Stop Default button's property to .T. and now I can quit the loop but stil it doesn't react quickly (like the behavior of "Stop" button in Find File of Windows,...)
>
>Maybe now I'll give it a try,... thanks, a lot for your solution,... it's help me much,...

You may get a faster response if you SET ESCAPE ON and give an ON ESCAPE DO MyEscHandler command just before the loop starts processing, then SET ESCAPE OFF both in MyEscHandler and just after the loop. This is lower-level Escape key trapping, and should be more efficient than having the form handle it.

HTH,
Rich.
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing
Previous
Reply
Map
View

Click here to load this message in the networking platform