Capture Symbol USB条形码扫描仪输入

时间:2021-04-19 21:52:46

I've been searching everywhere for a solution to capture the input from my Symbol USB barcode scanner without having focus on a particular textbox control. I've installed the Windows SDK from Motorola and still haven't had any success. Here's my situation. I have a form that allows the user to have either a grid view or a form view. I don't want to have to have the user put the cursor into a particular cell or textbox in order to capture the scan. I want to be able to have the user just scan the code and I'll programmatically put the information in the cell or textbox that it belongs to. Thanks in advance, Bill

我一直在寻找解决方案,以捕获我的Symbol USB条形码扫描仪的输入,而无需专注于特定的文本框控件。我已经从摩托罗拉安装了Windows SDK,但仍然没有取得任何成功。这是我的情况。我有一个表单,允许用户拥有网格视图或表单视图。我不想让用户将光标放入特定的单元格或文本框中以捕获扫描。我希望能够让用户只扫描代码,我将以编程方式将信息放在它所属的单元格或文本框中。比尔,提前谢谢

1 个解决方案

#1


1  

Depending on your USB scanner it is possibly acting as a keyboard wedge. What happens if you are in a text box and perform a scan? Do characters get inserted into the text box? If they do then simply set up an event on the form that captures keyboard events and then you should be able to direct them to whichever input control you desire.

根据您的USB扫描仪,它可能充当键盘楔。如果您在文本框中并执行扫描会发生什么?字符是否插入文本框?如果他们这样做,那么只需在捕获键盘事件的表单上设置一个事件,然后您就可以将它们指向您想要的任何输入控件。

#1


1  

Depending on your USB scanner it is possibly acting as a keyboard wedge. What happens if you are in a text box and perform a scan? Do characters get inserted into the text box? If they do then simply set up an event on the form that captures keyboard events and then you should be able to direct them to whichever input control you desire.

根据您的USB扫描仪,它可能充当键盘楔。如果您在文本框中并执行扫描会发生什么?字符是否插入文本框?如果他们这样做,那么只需在捕获键盘事件的表单上设置一个事件,然后您就可以将它们指向您想要的任何输入控件。