Barcode scanning

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Samuel Shulman

    #1

    Barcode scanning

    I assume that when I use a barcode reader (at least some of them) it will
    input the number as though it was entered in via the keyboard

    How can I then get the value without setting to focus to a textbox control I
    don't want the user to see the scanned number but I still need a way to read
    the value, in addition, I need an event that will be fired once the barcode
    was read in full so I know it actually finished reading

    Thank you,
    Samuel


  • iwdu15

    #2
    RE: Barcode scanning

    ive never done it myself but a quick look at thecodeproject brought about these




    --
    -iwdu15

    Comment

    • Brian Tkatch

      #3
      Re: Barcode scanning


      Samuel Shulman wrote:
      I assume that when I use a barcode reader (at least some of them) it will
      input the number as though it was entered in via the keyboard
      >
      How can I then get the value without setting to focus to a textbox control I
      don't want the user to see the scanned number but I still need a way to read
      the value, in addition, I need an event that will be fired once the barcode
      was read in full so I know it actually finished reading
      >
      Thank you,
      Samuel
      Just a guess.

      On the form's keypress start a one-second timer and capture all keys.
      In the timer tick event, (turn the timer off and) validate the keys. If
      it is a barcode, deal with it, otherwise give focus and set the text
      property to the captured keys.

      Or something like that. That idea would need a lot of tweaking to
      handle all cases.

      B.

      Comment

      • Samuel Shulman

        #4
        Re: Barcode scanning

        Thanks Brian,
        any idea about a control that is invisible and may receive the key strokes?


        "Brian Tkatch" <Maxwell_Smart@ ThePentagon.com wrote in message
        news:1153319583 .137200.120760@ b28g2000cwb.goo glegroups.com.. .
        >
        Samuel Shulman wrote:
        >I assume that when I use a barcode reader (at least some of them) it will
        >input the number as though it was entered in via the keyboard
        >>
        >How can I then get the value without setting to focus to a textbox
        >control I
        >don't want the user to see the scanned number but I still need a way to
        >read
        >the value, in addition, I need an event that will be fired once the
        >barcode
        >was read in full so I know it actually finished reading
        >>
        >Thank you,
        >Samuel
        >
        Just a guess.
        >
        On the form's keypress start a one-second timer and capture all keys.
        In the timer tick event, (turn the timer off and) validate the keys. If
        it is a barcode, deal with it, otherwise give focus and set the text
        property to the captured keys.
        >
        Or something like that. That idea would need a lot of tweaking to
        handle all cases.
        >
        B.
        >

        Comment

        • Dick Grier

          #5
          Re: Barcode scanning

          Hi,

          IMO, attempts to do this (setting focus to a textbox or other object to
          receive the scans) is doomed to "limited" success. The best solution, IMO,
          is to insist on a serial barcode reader (or a USB reader that provides a
          serial -- not HID emulation). Then, no matter what the user does, the scans
          will be delivered to the appropriate code for processing. Fortunately,
          serial readers are not much more expensive that those that emulate a
          keyboard (perhaps and extra $15), but the operational experience is MUCH
          better.

          Dick

          --
          Richard Grier, MVP
          Hard & Software
          Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
          Edition,
          ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
          2006.
          See www.hardandsoftware.net for details and contact information.


          Comment

          • PGC

            #6
            Re: Barcode scanning

            Hi Samuel,

            A simple keyboard "wedge" type scanner will do what you want and most can be
            programmed to send some "end of message" character although this is usually
            a CR. Your keypress event can trap the EndOfMessage and then lookup the
            product table (or whatever) as required. You will need to display the
            textbox to capture the barcode data for a number of good reasons ...
            The keyboard requires an input focus, the user gets the visual feedback
            (good for problem solving), and finally, if the barcode is unreadable, (you
            always get stuck behind these people at checkouts), the user at least has
            the opportunity of keying it in!!

            If you really don't want the gui to capture the barcode data then Dick's
            suggestion (USB or Serial) port scanner is the best option but you will need
            to learn about how to program for these (serial port) devices. You will also
            need to figure out what to do about unreadable or mis-read codes.

            Hope this helps.

            Paul

            "Samuel Shulman" <samuel.shulman @ntlworld.comwr ote in message
            news:uW%236UHpq GHA.644@TK2MSFT NGP05.phx.gbl.. .
            >I assume that when I use a barcode reader (at least some of them) it will
            >input the number as though it was entered in via the keyboard
            >
            How can I then get the value without setting to focus to a textbox control
            I don't want the user to see the scanned number but I still need a way to
            read the value, in addition, I need an event that will be fired once the
            barcode was read in full so I know it actually finished reading
            >
            Thank you,
            Samuel
            >

            Comment

            • Brian Tkatch

              #7
              Re: Barcode scanning


              Samuel Shulman wrote:
              Thanks Brian,
              any idea about a control that is invisible and may receive the key strokes?
              >
              >
              "Brian Tkatch" <Maxwell_Smart@ ThePentagon.com wrote in message
              news:1153319583 .137200.120760@ b28g2000cwb.goo glegroups.com.. .

              Samuel Shulman wrote:
              I assume that when I use a barcode reader (at least some of them) it will
              input the number as though it was entered in via the keyboard
              >
              How can I then get the value without setting to focus to a textbox
              control I
              don't want the user to see the scanned number but I still need a way to
              read
              the value, in addition, I need an event that will be fired once the
              barcode
              was read in full so I know it actually finished reading
              >
              Thank you,
              Samuel
              Just a guess.

              On the form's keypress start a one-second timer and capture all keys.
              In the timer tick event, (turn the timer off and) validate the keys. If
              it is a barcode, deal with it, otherwise give focus and set the text
              property to the captured keys.

              Or something like that. That idea would need a lot of tweaking to
              handle all cases.

              B.
              Nope.

              I thought maybe the form got it first.

              Either that or have one function handle all the form's control's
              keypress events.

              B.

              Comment

              • Brian Tkatch

                #8
                Re: Barcode scanning


                Dick Grier wrote:
                Hi,
                >
                IMO, attempts to do this (setting focus to a textbox or other object to
                receive the scans) is doomed to "limited" success. The best solution, IMO,
                is to insist on a serial barcode reader (or a USB reader that provides a
                serial -- not HID emulation). Then, no matter what the user does, the scans
                will be delivered to the appropriate code for processing. Fortunately,
                serial readers are not much more expensive that those that emulate a
                keyboard (perhaps and extra $15), but the operational experience is MUCH
                better.
                >
                Dick
                Yep. Just like to say i agree with this sentiment.

                B.

                Comment

                • Samuel Shulman

                  #9
                  Re: Barcode scanning

                  Please excuse me for being so naive (I am new to POS systems)
                  What is IMO and what is HID

                  Thanks,
                  Samuel


                  "Dick Grier" <dick_grierNOSP AM@.msn.comwrot e in message
                  news:uDI$080qGH A.2452@TK2MSFTN GP03.phx.gbl...
                  Hi,
                  >
                  IMO, attempts to do this (setting focus to a textbox or other object to
                  receive the scans) is doomed to "limited" success. The best solution,
                  IMO, is to insist on a serial barcode reader (or a USB reader that
                  provides a serial -- not HID emulation). Then, no matter what the user
                  does, the scans will be delivered to the appropriate code for processing.
                  Fortunately, serial readers are not much more expensive that those that
                  emulate a keyboard (perhaps and extra $15), but the operational experience
                  is MUCH better.
                  >
                  Dick
                  >
                  --
                  Richard Grier, MVP
                  Hard & Software
                  Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
                  Edition,
                  ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
                  2006.
                  See www.hardandsoftware.net for details and contact information.
                  >

                  Comment

                  • Brian Tkatch

                    #10
                    Re: Barcode scanning


                    Samuel Shulman wrote:
                    Please excuse me for being so naive (I am new to POS systems)
                    What is IMO and what is HID
                    >
                    Thanks,
                    Samuel
                    >
                    >
                    "Dick Grier" <dick_grierNOSP AM@.msn.comwrot e in message
                    news:uDI$080qGH A.2452@TK2MSFTN GP03.phx.gbl...
                    Hi,

                    IMO, attempts to do this (setting focus to a textbox or other object to
                    receive the scans) is doomed to "limited" success. The best solution,
                    IMO, is to insist on a serial barcode reader (or a USB reader that
                    provides a serial -- not HID emulation). Then, no matter what the user
                    does, the scans will be delivered to the appropriate code for processing.
                    Fortunately, serial readers are not much more expensive that those that
                    emulate a keyboard (perhaps and extra $15), but the operational experience
                    is MUCH better.

                    Dick

                    --
                    Richard Grier, MVP
                    Hard & Software
                    Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
                    Edition,
                    ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
                    2006.
                    See www.hardandsoftware.net for details and contact information.
                    IMO is "In My Opinion"
                    HID is "Human Interface Device"

                    Q:What does PC-MCIA stand for?
                    A:People Can't Memorize Complex Industry Acronyms

                    BTW, a good URL is <URL:www.acrony mfinder.com>, HTH.

                    B.

                    Comment

                    • Samuel Shulman

                      #11
                      Re: Barcode scanning

                      Thanks,

                      Samuel


                      "Brian Tkatch" <Maxwell_Smart@ ThePentagon.com wrote in message
                      news:1153427737 .786557.63290@m 73g2000cwd.goog legroups.com...
                      >
                      Samuel Shulman wrote:
                      >Please excuse me for being so naive (I am new to POS systems)
                      >What is IMO and what is HID
                      >>
                      >Thanks,
                      >Samuel
                      >>
                      >>
                      >"Dick Grier" <dick_grierNOSP AM@.msn.comwrot e in message
                      >news:uDI$080qG HA.2452@TK2MSFT NGP03.phx.gbl.. .
                      Hi,
                      >
                      IMO, attempts to do this (setting focus to a textbox or other object to
                      receive the scans) is doomed to "limited" success. The best solution,
                      IMO, is to insist on a serial barcode reader (or a USB reader that
                      provides a serial -- not HID emulation). Then, no matter what the user
                      does, the scans will be delivered to the appropriate code for
                      processing.
                      Fortunately, serial readers are not much more expensive that those that
                      emulate a keyboard (perhaps and extra $15), but the operational
                      experience
                      is MUCH better.
                      >
                      Dick
                      >
                      --
                      Richard Grier, MVP
                      Hard & Software
                      Author of Visual Basic Programmer's Guide to Serial Communications,
                      Fourth
                      Edition,
                      ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised
                      March
                      2006.
                      See www.hardandsoftware.net for details and contact information.
                      >
                      >
                      IMO is "In My Opinion"
                      HID is "Human Interface Device"
                      >
                      Q:What does PC-MCIA stand for?
                      A:People Can't Memorize Complex Industry Acronyms
                      >
                      BTW, a good URL is <URL:www.acrony mfinder.com>, HTH.
                      >
                      B.
                      >

                      Comment

                      Working...