Results 1 to 12 of 12

Thread: USB Barcode scanners in VB6?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2003
    Posts
    830

    USB Barcode scanners in VB6?

    It is fairly easy to use a comm port scanner, but what about USB? Has anyone had any experience with this?

    Thanks!

  2. #2
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: USB Barcode scanners in VB6?

    I tried one a while back...
    plugged it in.. opened notepad.. scanned something and the numbers appeared in notepad.

    what happens when you try this?
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2003
    Posts
    830

    Re: USB Barcode scanners in VB6?

    Did you try in VB6? Did you get it working?

    I do not have a USB scanner at present. I am "researching" to see if (and how) it can (is) done. I was told by another programmer that you would have to write USB drivers for each scanner that you used. I simply do not know....so I am asking.

    Thanks!

  4. #4
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: USB Barcode scanners in VB6?

    Every barcode scanner I have ever seen was a "keyboard" scanner - in that I mean it plugged into the keyboard jack on the PC and the keyboard plugged into that.

    So in essence they all just simply loaded "keystrokes" into the keyboard buffer as if typed on the keyboard.

    I cannot imagine that a USB scanner is any different then that. Many keyboards today are USB cabled - so it makes sense to have USB cabled barcode scanners.

    Please give a link for a USB scanner you are considering...

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: USB Barcode scanners in VB6?

    I dont not believe that any barcode scanner would come without its supporting drivers as the manufacturer wants you to be able to use it and like it. If they make it hard to use or not even sscannable then who would want to buy it.

    Its just like already posted, a substitute for keyboard entry. formatting the barcode is usually all that is necessary. Are you going to be using a barcode font?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2003
    Posts
    830

    Re: USB Barcode scanners in VB6?

    All barcode scanners are not "wedge" (keyboard) scanners. Comm port scanners plug into the serial port and in VB6 you would look for an event on the comm port to see the scan. So SZLAMANY.... there are other scanners than keyboard scanners.

    RobDog888... While the scanner itself may have it's on drivers....how the scan is interpreted in VB6 is what I am curious about. In VB6 you can add a MScomm control for the comm port. What do you do for USB? Now it may be that you do not have to do anything and VB6 will see the scan. That's why I am here.

    Thanks!

  7. #7
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: USB Barcode scanners in VB6?

    I've not seen a comm-port scanner since 1990

    Could you post a link to the actual scanner - please...

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  8. #8
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: USB Barcode scanners in VB6?

    Yes, then it will depend on the scanner you get. I would recommend checking if the scanner your interested in comes with any guides or examples and if it comes with drivers and if its simulating a hardware level keyboard keypress etc.

    Most motherboards now only come with one COM port so you will need to make sure its not already being used by another device at your customers site or whereever?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  9. #9

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2003
    Posts
    830

    Re: USB Barcode scanners in VB6?

    Quote Originally Posted by szlamany
    I've not seen a comm-port scanner since 1990

    Could you post a link to the actual scanner - please...


    I have two brand new ones on my desk.

    SYMBOL DS
    P/N: DS3408-SF20005

    http://www.symbol.com/product.php?pr...b=Data%20Sheet

    Interfaces Supported RS232, Keyboard Wedge, Wand Emulation, Scanner Emulation, IBM 468X/469X, USB and Synapse

  10. #10

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2003
    Posts
    830

    Re: USB Barcode scanners in VB6?

    I think how they are getting around this is that the software for the scanner installs a "virtual" comm port. I guess I will have to get one to actually find out the details. I do know that I can use a USB to serial adaptor and make a virtual comm port. I have done that. So...maybe it works the same way.

    The key point here is "processes and events". Think about a scanner that works in the background. No textboxes or fields. The scanner just scans and that event is picked up by the software (comm control) and is then processed.

    Thanks!
    Last edited by birthjay; Jul 10th, 2006 at 01:07 PM.

  11. #11
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: USB Barcode scanners in VB6?

    Quote Originally Posted by birthjay
    The key point here is "processes and events". Think about a scanner that works in the background. No textboxes or fields. The scanner just scans and that event is picked up by the software (comm control) and is then processed.
    A serial port scanner works that way. A keyboard scanner works that way. I can't think of a way to make a barcode scanner that wouldn't work that way. The textbox or field isn't created by the scanner, it's created by the program that's reading the scanner. If you don't have a textbox in your program there won't be one, regardless of the source of data.

    (And most USB barcode scanners just use the default USB chip manufacturer's virtual serial port driver, so you read the scanner as a serial device.)
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  12. #12

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2003
    Posts
    830

    Re: USB Barcode scanners in VB6?

    Quote Originally Posted by Al42
    A serial port scanner works that way. A keyboard scanner works that way. I can't think of a way to make a barcode scanner that wouldn't work that way. The textbox or field isn't created by the scanner, it's created by the program that's reading the scanner. If you don't have a textbox in your program there won't be one, regardless of the source of data.

    (And most USB barcode scanners just use the default USB chip manufacturer's virtual serial port driver, so you read the scanner as a serial device.)
    So...who said the scanner created the textbox????? I think your last paragraph makes the most sense. From what I have read so far that is likely the case; however, this other fellow I have been talking to has some experience with this and says it is not as easy as it appears.

    On to testing I suppose.

    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width