用于手持式条形码扫描仪的Winform代码。 [英] Winform code for handheld barcode scanner.

查看:102
本文介绍了用于手持式条形码扫描仪的Winform代码。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是编程的新手,我被要求创建一个使用手持式摩托罗拉条码扫描器扫描条形码的软件,从我读过的这些扫描仪被计算机识别为键盘。



我只找到WPF的代码,我正在使用WinForms。



请帮助。



我尝试过:





[ ^ ]

I'm new to programming, I've been asked to create a software that scans barcodes using a handheld Motorola Barcode Scanner, from what I've read these scanners are recognized as a keyboard by the computer.

I'm only finding code foe WPf and I'm using WinForms.

Please Help.

What I have tried:


[^]

推荐答案

大多数条形码扫描仪都配置为键盘 - 因此当您扫描项目时,您会得到一个文章编号,就像用户拥有的一样从人类可读部分读取并输入 - 你不需要做任何事情除非您需要知道数据的开始和结束时间,否则需要在Winforms或WPF中具体处理扫描数据。在这种情况下,您需要做的第一件事是与扫描仪的制造商交谈,并找出如何配置它以提供引导和尾随指示器。



如果你有,你可以检测它们(制造商也可能会提供代码示例) - 但在那之前,它只是键盘数据,没有别的。
Most barcode scanners come configured as a keyboard - and as such when you scan an item, you get an Article Number exactly as if the user had read it from the human readable section and typed it in - you don't need to do anything specific in either Winforms or WPF to handle the scanned data unless you need to know when the data starts and ends. In that case, the first thing you need to do is talk to the manufacturer of your scanner and find out how to configure it to provide lead in and trailing indicators.

When you have that, you can detect them (the manufacturer will probably provide code examples as well) - but until then, it's just keyboard data, nothing else.


这篇关于用于手持式条形码扫描仪的Winform代码。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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