Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Edit Box
Message
 
 
To
31/12/2001 10:10:39
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00599364
Message ID:
00599386
Views:
14
Claudio,

The Valid event doesn't occur until just before the control loses focus so your code is never even triggering because the escape key doesn't cause a focus change. Also the text is already gone by time the Valid event fires because it's handled by the baseclass KeyPress behavior. You can use this code in the KeyPress() method instead:
LPARAMETERS nKeyCode, nShiftAltCtrl

if ( nKeyCode = 27 )
   nodefault
endif
>In a editbox i accept a text but when press Esc key the text dissapear.
>In de valid method i control this:
>if lastkey() = 27
> messagebox("Presiono Esc",48,"manejo de errores"
>endif
>But i press Esc key and not display this mensaje why ???
>In other text i accept a date when a invalid date is entered the message "invalid date" appear. How i control show not appear this message.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform