Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
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.
Posted 12-Oct-11 5:30am
Edited 12-Oct-11 6:04am
Albert Holguin at 12-Oct-11 11:11am
This question may be a bit too vague... expect vague answers...
amsainju at 12-Oct-11 12:23pm
ya maybe i am not a pro..just learning so can't properly explain sorry... but i got my answer

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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
amsainju at 12-Oct-11 11:53am
thanks pal....u solved my big problem...thanks alot...
DaveyM69 at 12-Oct-11 18:43pm
Most barcode scanners I have come across can be programmed to use a different or no suffix. All the ones in my company for example are programmed to send TAB after the scanned code.
Arun Kumar K S at 15-Oct-11 2:00am
Use TextBox2.Focus() method
amsainju at 14-Oct-11 5:51am
how can we program the barcode for different key?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Advertise | Privacy | Mobile
Web01 | 2.8.150327.1 | Last Updated 12 Oct 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100