Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
F1 problem revisited
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00819020
Message ID:
00819226
Views:
10
>I thought I had it solved or so it once was but is back. I have code in a form that says SET FUNCTION F1 to '28'. The user is instructed to press F1 to save all changes, but if there is incorrect data (which in the keypress event there is code to validate user input), the form stays open and the users must correct their data. However in the case of a needed correction, hitting the F1 key puts a "2" into the current textbox, the 2 being the "2" of 28. A way to eliminate this?

Hi Thimothy,

SET FUNCTION F1 to '28' puts two characters '28' into keyboard buffer every time user presses F1. I don't think it was your intention. I would suggest that you change it to SET FUNCTION F1 to CHR(228) that will put one character CHR(228) into keyboard buffer. In keypresss event you would check for CHR(228) and perform any required action. To discard it add NODEFAULT to keypress. Instead of CHR(228) you can use any other character that cannot be entered from keyboard.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform