Visual Studio 2008中的条形码事件处理 [英] Barcode event handling in Visual Studio 2008

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

问题描述

嗨 我正在建立一个需要条形码接口的库存系统.在我的程序中,我正在考虑保留一个文本框,将光标放在其中,当扫描条形码时,数据库中代码的相应数据应以相同的形式显示在数据库中.

如何管理条形码输入的事件处理?我正在使用Visual Studio2008.

谁能帮我吗?

谢谢.

Arpan

Hi I am building a inventory system in which I require a barcode interface. In my program I am thinking to keep a textbox in which the cursor is focused and when the barcode is scanned the corresponding data of the code in the database should be displayed in the database in the same form.

How can I manage the event handling of barcode entry? I am using Visual Studio 2008.

Can anyone please help me?

Thank you.

Arpan

推荐答案

您是否注意到我们在扫描条形码到计算机时会打印字符串并将光标移至下一行...,
即,在文本框中打印条形码字符串后,按下一个回车键即可,您可以通过按键事件检查此情况


Do you noticed when we scan a barcode to computer it will print the character string and move the cursor to next line...,
ie,One enter is pressing after printing barcode string in text box, You can check this from keydown event


private void textBox1_KeyDown(object sender, KeyEventArgs e)
       {

           if (e.KeyCode == Keys.Enter)
           {
               //Type your code for getting data from database
           }

       }


这篇关于Visual Studio 2008中的条形码事件处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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