I guess I'm not following your question. You can scan any barcode you like. Your business logic layer will be responsible for ensuring it is of the correct length and correct type (numeric, alpha, alpha-numeric etc). Once the code has been scanned, you have captured the data and can validate it, then do a look up for related information. Most of the scanners are programable. What I found useful was to code the gun to insert a tab after the data. This fires a lost focus event, assuming that you scan the data into a textbox. Take the resulting data and validate it. Then do what you need to do. Didn't read CK's post. S/He is correct. The textchanged event will fire for each character in the scanned results. Checking for a specific length may not work. You may be trying to capture a 10 char entry. If the incorrect code is scanned and you have 11 or more characters, you could run into problems. That is why I advocate a tab character after the code is scanned. On Wed, Sep 24, 2008 at 8:28 AM, Brock <[EMAIL PROTECTED]> wrote:
> > I use a USB scanner and tried the notepad trick and it writes fine. > One related question while we are on this topic... is it possible to > scan a barcode with say a 10 digit number that has the same value in a > database (that number being the key field) and have another field, the > CompanyName, display immediately in a textbox? > Thanks! > > On Sep 23, 4:47 am, "Grzegorz K" <[EMAIL PROTECTED]> wrote: > > Scanners works exactly like a keyboards. You can check it by opening a > > notepad,word etc and scan a code, it should appears on word processor you > > had open. > > > > 2008/9/23 Arsalan Tamiz <[EMAIL PROTECTED]> > > > > > > > > > Normally PS/2, barcode scanners send keystrokes. Which means when you > scan > > > the code, it comes in like someone typing the barcode through keyboard. > > > Usually it ends on CrLf. > > > > > And I haven't used the USB barcode scanners. Maybe they work in the > same > > > manner. > > > > > On Mon, Sep 22, 2008 at 4:18 AM, Badawi <[EMAIL PROTECTED]> wrote: > > > > >> Hi all of you, > > > > >> I'm a newbie in C#.NET development and i need help in handling barcode > > >> scanners within C# application. > > >> How i can read barcodes from a barcode scanner (both types USB and PS/ > > >> 2)? > > >> And if there is a way to read barcodes independently on the scanner > > >> type (USB or PS/2), i will be so happy to know. > > > > >> thanks in advance, > > >> Badawi- Hide quoted text - > > > > - Show quoted text - > > > -- _______________________________ Take care, Paul It is not we non-interventionists who are isolationists. The real isolationists are those who impose sanctions and embargos on countries and peoples across the globe and who choose to use force overseas to promote democracy. A counterproductive approach that actually leads the U.S. to be more resented and more isolated in the world. Dr. Ron Paul www.RonPaul2008.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://cm.megasolutions.net/forums/default.aspx -~----------~----~----~----~------~----~------~--~---
