hi all, please i would like to know how to pass a value read by a barcode scanner to a TEdit component. thanks
Mailing lists / lazarus / 2013-06
how to pass barcode value to a TEdit component
13 messages · 6 people · –
- JJohan Tu Toit 5
- MMarius 2
- ZZaher Dirkey 2
- Zzeljko 2
- GGiuliano Colla 1
- GGraeme Geldenhuys 1
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Johan Tu Toit wrotehi all, please i would like to know how to pass a value read by a barcode scanner to a TEdit component. thanks
Just pass it. It's pure text and usualy have CRLF at the end.
MyEdit.Text := SomeStringFromBarCodeScannerReader;z.
hi all, please i would like to know how to pass a value read by a barcode scanner to a…
Johan Tu Toit wrotehi all, please i would like to know how to pass a value read by a barcode scanner to a TEdit component. thanks
Most barcode readers past the text via the keyboard so all you need todo is set the focus into the edit *unless you are using a comport scanner which are becoming rare these day's)
so once the focus in the myedit.text has been made, and the barcode scanner button has been triggered, the myedit.text received the value read from the barcode been scanned?
Marius wrote 16 lines
Johan Tu Toit wroteso once the focus in the myedit.text has been made, and the barcode scanner button has been triggered, the myedit.text received the value read from the barcode been scanned?
Yes, it's as simple as that, provided you have set up your scanner to behave as a keyboard (which is the standard behavior for most scanners). You may verify it with any text editor: open a text editor, then trigger your barcode scanner, and you should see the value read into your editor window. If it works, then it will work also with your myedit.text.
Giuliano
so a usb barcode scanner can be setup to have a keyboard behavior?
Giuliano Colla wrote 21 lines
Johan Tu Toit wroteso a usb barcode scanner can be setup to have a keyboard behavior?
Yes
zeljko
zeljko wroteso a usb barcode scanner can be setup to have a keyboard behavior? > Yes
??Not all, some have special DLL, or emulate COM port.
Zaher Dirkey wrote 9 lines
That is still possible wiith most scanners, but using it as a comport makes it also a unique resource which cannot be shared with multiple applications. Not sure if Johan wants its that way
so a usb barcode scanner can be setup to have a keyboard behavior?
Johan Tu Toit wroteso a usb barcode scanner can be setup to have a keyboard behavior?
?It is depends on your barcode scanner?, if you will buy it then choose witch can do keyboard behavior.
Best Regards
Zaher Dirkey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130623/781ea73a/attachment.html>
i will buy it. its better to choose keyboard behavior and use the pc keyboard usb.
Zaher Dirkey wrote 12 lines
so once the focus in the myedit.text has been made, and the barcode scanner button has…
Johan Tu Toit wroteso once the focus in the myedit.text has been made, and the barcode scanner button has been triggered, the myedit.text received the value read from the barcode been scanned?
Yes, barcode scanners simply input what they read, as if it was typed with the keyboard. Think of the barcode scanner as an "alternative keyboard".
With some scanners you can often program them to auto add TAB, LINEFEED or ENTER after what they scanned. That behaviour is dependent on your software, and sometimes very handy.
Regards,
- Graeme -
Thanks for all
Graeme Geldenhuys wrote 23 lines
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130624/f7209d56/attachment-0001.html>
