Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stupid question
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01309268
Message ID:
01309310
Views:
7
>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.

I believe the idea of it may be to distinguish spaces entered by user.

But you should not have written the title as is anyway, because it's quite an interesting question and the thread's title should be descriptive.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform