Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
On Escape
Message
From
27/02/2001 20:40:50
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00480291
Message ID:
00480346
Views:
7
>That stops the error message, but I'm trying to find a way to stop the execution of a long loop in the command.click() event, such as by pressing "Q" or something. I have this in the command.keypress() but it's not working:
>
>LPARAMETERS nKeyCode, nShiftAltCtrl
>
>if inlist(nKeyCode,81,113)
> release thisform
>endif

You can put a DOEVENTS() in the loop to tell VFP to process keyboard and mouse events. In a method triggered by your 'escape' key, set a form property, and check that property in your loop:
For i = 1 TO Whatever
* Do a bunch of stuff here

  DOEVENTS()
  IF THISFORM.UserCancelled
    EXIT
  ENDIF
ENDFOR
Erik Moore
Clientelligence
Previous
Reply
Map
View

Click here to load this message in the networking platform