Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stupid question
Message
From
09/04/2008 09:26:30
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01309268
Message ID:
01309271
Views:
13
My *guess* is so that the characters actually entered by the user can be idntified. Spaces entered and the like.

Does it strip out the 255s before it SEEKs?



>This is indeed a stupid question. If you don't like stupid questions, please don't read on <g>.
>
>I have a text box class (I call it Seeker) that I use on a lot of forms with a grid. The idea is very common: user enters some characters in the Seeker textbox and the program dynamically advances the record/row in the grid, according to the entered characters.
>
>I have been using this class since I downloaded it from a publicly available class in dBase for Window.
>
>The code in the KeyPress of this class does the following:
>
>It first stuffs a character 255 (keyboard chr(255)) into the buffer and then, on the next process of KeyPress (because keyboard fires it again), the code checks if the nKeyCode is 255 and then Seeks (using SEEK()) in the source table.
>
>What I don't understand and don't remember the explanation (but I do remember that there was an explanation of this "stuffing of chr(255)" in the description of the downloaded class), is why the hell do I need this KEYBOARD CHR(255)? And why I can't just seek the value on the entered key?
>
>I need to write this entire routine of "Seeker" but need to understand the ramifications of change.
>
>Thank you.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform