Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checking to see if command is being executed..
Message
From
16/06/1999 15:41:37
 
 
To
16/06/1999 15:28:23
Frank Cavone
Monetary Management of Ny, Inc.
Albany, New York, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00230549
Message ID:
00230618
Views:
28
Hi Frank,

You're welcome. To help you understand what's going on, LastKey() return the ASCII code of the last key that was pressed. 27 is the ASCII equivalent of the escape key. When you assign Cancel = .T. in a command button, VFP will put 27 for LastKey() to pick up.

Now for the KEYBOARD/Inkey() part. Since LastKey() will keep it's current value until a key is pressed on the keyboard, you need to clear it so that if the user only clicked around, you won't still have 27 in it, like you had in your previous test. KEYBOARD Chr(255) will put a blank value in the keyboard buffer. To keep your control from getting this value, you call Inkey() to "eat" the dummy value.

Hope that clear a little bit the code.

>i tried the updated code in the beginning of the valid event. it works the way i wanted it to work. i cant say i totally understand but it works.
>thanks again for the help. youve been helpful in the past also.
Previous
Reply
Map
View

Click here to load this message in the networking platform