Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Text box should accept value only by barcode scanner.
Message
From
23/08/2002 08:42:27
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00692776
Message ID:
00692850
Views:
24
Antonio

I agree with Antonio. Wedge scanners (that simply drop characters into the keyboard buffer) are easily configured to terminate with a CR.

Alternatively use a timer that is activated by the textbox Keypress event and restarted with each character press. Set the timer to 150ms or something slower than the scanner adds characters. It will only fire when the scanner is finished adding characters. When it fires, it simply adds a CR to the keyboard buffer and disables itself. Turn the timer off in your Lostfocus event to be sure.

Regards

JR
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Previous
Reply
Map
View

Click here to load this message in the networking platform