使用哪个事件? [英] which event to use ?

查看:109
本文介绍了使用哪个事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用条形码扫描仪,将条形码插入任何已激活的文本字段中.我想将此条形码放入数据库中,我尝试了很多事件,但是所有事件仅在从条形码读取第一个字符后才触发.所以我虽然使用固定长度的数组并将字符插入其中,但我不知道要使用哪个事件.你能帮我吗?

只需单击按钮,扫描仪就非常易于使用,条形码会显示在
上 Word文件,Excel工作表,即使您正在重命名文件或文件夹也将出现在名称字段中.

我使用了这些事件(textchanged, keypress, keyup)

我想在不单击表单中任何按钮的情况下将条形码插入数据库.只需读取字符串并插入即可.
我不希望任何代码只是提示.

预先感谢.

I am using a barcode scanner that insert the barcode in any text field activated. I want to put this barcode into database, I tried so many events but all of them fire after reading first char only from barcode. So i though of using array with a fixed length and insert the chars into it but I don''t know which event to use. Can you help me?

The scanner is very easy to use you just click the button and the barcode will appear on
word file, excel sheet even if you were renaming your file or your folder will appear in name field.

I used these events (textchanged, keypress, keyup)

I want to insert barcode into database without clicking any button in the form. Just reading the string and insert.
I don''t want any code just hints.

Thanks in advance.

推荐答案

如您所见:
http://www.racoindustries.com/motorola-ds4208-features.htm [ ^ ]-扫描仪支持OPOS.因此,我建议使用 OPOS API [ ^ ]

以我的经验,它简单可靠:)

问候
Espen Harlinn
As you can see here:
http://www.racoindustries.com/motorola-ds4208-features.htm[^] - the scanner supports OPOS. So I would recommend using the OPOS API[^]

In my experience it''s simple and reliable :)

Regards
Espen Harlinn


我知道的大多数条形码扫描器都可以配置为在读取条形码后发送特殊字符(例如换行符CRLF).您可以使用任何事件(文本更改,按键),然后检查是否收到了该字符.这应该允许您在将字符串完全输入到文本框中之后将文本发送到数据库.
Most barcode scanners I know of can be configured to send a special character (e.g. a line break CRLF) after reading a barcode. You could use any event (textchanged, keypress) and then check if that character was received. This should allow you to send the text to the database after the string was completely entered into the textbox.


这篇关于使用哪个事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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