Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Controlling the Escape Key
Message
From
12/03/1999 11:01:40
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Controlling the Escape Key
Miscellaneous
Thread ID:
00196820
Message ID:
00196820
Views:
60
I have a form that I am working on that has the cancel button the default button if the Escape Key is pressed. This works fine. However when the user presses the Find Button the Click Method makes the buttons invisible and activates the field for the Record Key. If the user enters a value and presses return, no problems. However, I want the user to be able to cancel out of this by pressing the escape key.

I setup a KeyPress method on this field to check for the Escape Key. If it has been pressed it calls THISFORM.control.LostFocus(), which works great except that the default cancel button sees the escape also and exits the form. Before I put in the KeyPress method, the Escape Key was totally ignored.

How to I control what the escape key does or does not do at different times on this form?

Norm
____________________________________________

Norm Peterson

It's a dog eat dog world out there,
and I'm wear'n milk bone underware!
Next
Reply
Map
View

Click here to load this message in the networking platform