条形码扫描 [英] Barcode scanning

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

问题描述

我认为当我使用条形码阅读器(至少其中一些)时,它会输入数字,就好像它是通过键盘输入一样


如何在不设置焦点到文本框控件的情况下获取值我不希望用户看到扫描的数字,但我还是需要一种方法来阅读

该值,此外,我需要一个事件,一旦条形码

被完全读取就会被解雇所以我知道它实际上已经完成阅读


谢谢你,

Samuel

解决方案

我自己从未做过,但快速浏览一下这个代码项目带来了这些

http://thecodeproject.com/vb/ net / bcreader2of5.asp
http:// thecodeproject .com / vb / net / demmvbscan.asp
http://thecodeproject.com/vb/net/Bar...gAndVerify.asp

-

-iwdu15




Samuel Shulman写道:


我假设当我使用条形码阅读器(至少其中一些)时,它会输入数字,就好像它是通过输入来输入的一样键盘


如何在没有设置焦点到文本框控件的情况下获取值我

不希望用户看到扫描的数字但是我仍然需要一种方法来读取价值,另外,我需要一个事件,一旦条形码

完全读完就会被解雇,所以我知道它实际上已经完成了阅读


谢谢,

Samuel



只是一个猜测。


在表格''的按键上启动一秒计时器并捕获所有键。

在计时器中打勾e通风口,(关闭计时器)验证按键。如果

它是条形码,请处理它,否则给焦点并将文本

属性设置为捕获的键。


或类似的东西。这个想法需要进行大量调整才能处理所有情况。


B.

感谢Brian,

任何关于一个不可见的控件并且可能会收到击键的想法?

" Brian Tkatch" < Ma *********** @ ThePentagon.com写了留言

新闻:11 ******************* ***@b28g2000cwb.googlegr oups.com ...


>

Samuel Shulman写道:


>我假设当我使用条形码阅读器(至少其中一些)时,它会输入数字,就像通过键盘输入一样

如何在不设置焦点到文本框的情况下获取值
控制我不希望用户看到扫描的数字,但我还是需要一种方法来
阅读
价值,此外,我需要一个事件,一旦
条码完整阅读就会被解雇,所以我知道它实际上已经完成了阅读

谢谢你,
Samuel



只是一个猜测。


在表格''的按键上开始一个 - 第二个计时器并捕获所有键。

在计时器滴答事件中,(关闭计时器并)验证键。如果

它是条形码,请处理它,否则给焦点并将文本

属性设置为捕获的键。


或类似的东西。这个想法需要进行大量的调整才能处理所有情况。


B.



I assume that when I use a barcode reader (at least some of them) it will
input the number as though it was entered in via the keyboard

How can I then get the value without setting to focus to a textbox control I
don''t want the user to see the scanned number but I still need a way to read
the value, in addition, I need an event that will be fired once the barcode
was read in full so I know it actually finished reading

Thank you,
Samuel

解决方案

ive never done it myself but a quick look at thecodeproject brought about these

http://thecodeproject.com/vb/net/bcreader2of5.asp
http://thecodeproject.com/vb/net/demmvbscan.asp
http://thecodeproject.com/vb/net/Bar...gAndVerify.asp
--
-iwdu15



Samuel Shulman wrote:

I assume that when I use a barcode reader (at least some of them) it will
input the number as though it was entered in via the keyboard

How can I then get the value without setting to focus to a textbox control I
don''t want the user to see the scanned number but I still need a way to read
the value, in addition, I need an event that will be fired once the barcode
was read in full so I know it actually finished reading

Thank you,
Samuel

Just a guess.

On the form''s keypress start a one-second timer and capture all keys.
In the timer tick event, (turn the timer off and) validate the keys. If
it is a barcode, deal with it, otherwise give focus and set the text
property to the captured keys.

Or something like that. That idea would need a lot of tweaking to
handle all cases.

B.


Thanks Brian,
any idea about a control that is invisible and may receive the key strokes?
"Brian Tkatch" <Ma***********@ThePentagon.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...

>
Samuel Shulman wrote:

>I assume that when I use a barcode reader (at least some of them) it will
input the number as though it was entered in via the keyboard

How can I then get the value without setting to focus to a textbox
control I
don''t want the user to see the scanned number but I still need a way to
read
the value, in addition, I need an event that will be fired once the
barcode
was read in full so I know it actually finished reading

Thank you,
Samuel


Just a guess.

On the form''s keypress start a one-second timer and capture all keys.
In the timer tick event, (turn the timer off and) validate the keys. If
it is a barcode, deal with it, otherwise give focus and set the text
property to the captured keys.

Or something like that. That idea would need a lot of tweaking to
handle all cases.

B.



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

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