条形码读取C#中的额外数字值 [英] Barcode reading extra digits values in C#

查看:83
本文介绍了条形码读取C#中的额外数字值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



<强>问题

当用c#读取条形码扫描器并接收变量读数值时

when read barcode scanner by c# and receive value of reading in variable


msg它将扫描的ItemCode读取为3300002266 / r并且此值错误

msg it reading scanned ItemCode as 3300002266/r AND this value is wrong

推荐答案

您忘记了重要的部分:您将扫描仪作为HID(键盘)运行。

You forgot the important part: you're running the scanner as HID (Keyboard).

在这种情况下,您有两种选择:

In this case, you have two choices:

1)没有特殊编码,用户有责任将焦点放在正确的目的地(TextBox)。

1) no special codeing, the user is responsible to place the focus into the correct destination (TextBox).

2)更改扫描仪设置,所以它使用条形码标记的特殊开始和结束(参见其文档)。然后在表单上使用过滤器。发送开始标记时,将任何数据重定向到条形码缓冲区,直到收到结束标记。还可以使用
计时器来检测中止的通信。

2) Change the scanner setup, so that it uses a special start and end of barcode marker (see its documentation). Then use a filter on the form. When the start marker was sent redirect any data to your barcode buffer until the end marker is received. Use also a timer to detect aborted communication.


这篇关于条形码读取C#中的额外数字值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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