Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trap a string of numbers with Keypress Event
Message
From
18/01/1999 22:57:54
Jaime Vila
Miami Children's Hosp. - Radiology
Miami, Florida, United States
 
 
To
18/01/1999 22:39:55
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00177377
Message ID:
00177470
Views:
37
>>>>

>Easiest way to do this is to have the form ready for the input by having the focus set to a textbox that can take control of the input and do the work for you. THe textbox doesn't have to be visible, or on the visible portion of the page.
>
>Most barcode scanners allow you to program in a special start and end character... you could have your form's keypress event watch for this character and set focus immediately to a textbox that would take the rest of the input.
>
>If this is not feasible because of your scanner or whatever, I would just assign a hotkey to the form that would setfocus to your textbox, and instruct the user that to ready the form for the scanner input, she must press you hotkey first.


I had initially tried setting focus to a hidden textbox and my problem was that once you scrolled through the grid due to a full screen of records , for instance, your input textbox focus was history!!

I also tried the scanner "preamble" feature but my application would interpret the F1 - F9 function keys differently than I had anticipated, ie. $M, $P etc. . . .

Oh well, . . a hot-key will have do the trick. One last question . . . Should I use ON KEY . (or some other command) in the Forms init method or the pageframe init or the grid's or where ?

Thanks again for your help.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform