Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determining button pressed from textbox LostFocus
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00236947
Message ID:
00242397
Views:
28
Thanks Jim. Works good. I like this even better than SYS(1270) as I found that if my mouse cursor just *happened* to be sitting over the Cancel button, .... :-)

I have had 'Effective Techniques' on order w/Amazon for a couple weeks. It was a special order, but their online reviews were just too good!

BTW, is the quote in your sig from Star Wars? (uh, I don't get it)

Oh, well. Thanks again!
Mike Collins



>Mike,
>
>An alternative appraoch that isnnot name dependent and will probably make your users happy, is to set the cancel button's Cancel property to .T. making it the Escape button. This causes the Escape key to fire the Cancel button's Click and a click on teh Cancel button will cause LastKey() to return 27 indicating the Escape key.
>
>Now in your LostFocus you simply;
>
>
>IF LastKey() = 27
>   * Cacnel
>   RETURN .T.
>ENDIF
>* Other processing here
>
Mike C.
-------
I keep trying to find a life of my own, apart from you.
DC Talk/Charlie Peacock, In the Light.
www.risensystems.com/ra/itlbegin.rm
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform