如何从条形码阅读器读取价值 [英] How read value from barcode reader

查看:82
本文介绍了如何从条形码阅读器读取价值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我有一个条形码阅读器型号:MS7120(LS USB),我正在为销售点(POS)开发一个Windows应用程序指导我如何从条形码阅读器中读取我的应用程序中的值。如果有任何dll,请告诉我我可以下载的链接。



提前许多..

问候

Aditya Tyagi

Hi,

I have a bar-code reader Model: MS7120 (LS USB), I m developing a windows application for point of sale (POS) please guide me how i can read the value in my application from bar-code reader. If there is any dll for this please let me know the link from i can download.

many thnx in advance..
Regards
Aditya Tyagi

推荐答案

三种选择:



1)USB-条形码扫描仪将具有键盘仿真功能。这意味着,扫描的条形码将出现在您当前的输入光标处,就好像您已将数字/字符串手动键入键盘一样。所以你可以只有一个文本输入控件,如果它是输入来自的键盘或条形码扫描器,就不要打扰。优点:最容易设置。缺点:当用户想要扫描条形码时,您必须注意文本输入控件始终具有输入焦点。



2)条形码的制造商扫描仪MIGHT有一个API。对于低预算扫描仪,通常没有。优点:输入控制没有问题。缺点:您将应用程序限制为一种类型的条形码扫描仪。比1)更多的工作



3)使用WindowsRaw Input API。在此CodeProject文章中进行了解释和演示:使用来自的原始输入C#处理多个键盘 [ ^ ]

优点:输入控件没问题。供应商特定的API没有问题。缺点:比1)更多的工作
Three options:

1) A USB-barcode scanner will have keyboard emulation. Meaning, a scanned barcode will appear at your current input cursor as if you've typed the number/string manually into a keyboard. So you could just have a text input control and just don't bother if it's a keyboard or barcode scanner where the input comes from. Advantage: Easiest to set up. Disadvantage: You have to take care that the text input control always has the input focus when the user might want to scan a barcode.

2) The manufacturer of your barcode scanner MIGHT have an API for it. For low budget scanners there are most often none. Advantage: No trouble with an input control. Disadvantage: You're limiting your application to one type of barcode scanner. More work than for 1)

3) Use the Windows "Raw Input API". Explained and demonstrated in this CodeProject article: Using Raw Input from C# to handle multiple keyboards[^]
Advantage: No trouble with an input control. No trouble with vendor specific API's. Disadvantage: More work than for 1)


询问供应商,他们将拥有API或SDK,毫无疑问也是样本代码。
Ask the vendor, they will have an API or SDK and no doubt sample code too.


这篇关于如何从条形码阅读器读取价值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆