Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trapping the Backspace Key
Message
From
13/08/1999 15:14:47
 
 
To
13/08/1999 15:10:56
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00253434
Message ID:
00253614
Views:
31
>>
*KeyPress
>>
>>Thisform.nLastKey = nKeyCode
>>
>>*Valid
>>
>>return !thisform.nLastKey = 127
Would this be right?
>
>It depends on what he wants to do with it. I understood him to be asking how to trap the keystroke so he could do whatever he wants to do with it. Generally if he just wants to discard the keystroke, I would do as Dan indicated, just use NODEFAULT to throw out the keystroke.
>
>Bill

In defense of Mike, it seems that he wants to prevent the user from moving to the previous object in the tab order when using the backspace. The above works, though you have to write some additional code to deal with mouse clicks.


"How can I best trap the backspace key in a textbox so that after the text is fully deleted the textbox does not lose the focus? I only want the focus to move to the previous control by using the mouse or shift-tab."
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform