VB6 code for barcode scanner


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Page 1 of 2 12 LastLast
Results 1 to 15 of 17

Thread: VB6 code for barcode scanner

  1. #1
    Join Date
    Dec 2007
    Posts
    27

    VB6 code for barcode scanner

    Hi

    I have LS2208 symbol barcode scanner ..... i need to read a VB6 code to read the barcode ...... it is working now but everytime if i scan it is reading automatically and put the data in focused window ... i need to control the read ......

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    What exactly is it that you need to do? Control the read how?
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  3. #3
    Join Date
    Dec 2007
    Posts
    27
    Ya need to do.....

  4. #4
    Join Date
    Dec 2007
    Posts
    27
    i want to read the barcode string from the barcode scanner .....
    when i scan the barcode it will send the data to the window which is foucused that time ......

    i want to disable and enable the barcode reader ......

    and also code to read the data from barcode ......

  5. #5
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    I'm confused. In your last post you say
    Quote Originally Posted by mathansj
    i want to read the barcode string from the barcode scanner .....
    when i scan the barcode it will send the data to the window which is foucused that time
    And in your first post, you say
    Quote Originally Posted by mathansj
    it is working now but everytime if i scan it is reading automatically and put the data in focused window
    It sounds to me like you are already doing what you want to do.
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  6. #6
    Join Date
    Dec 2007
    Posts
    27
    Hi

    Dont confuse ...
    read the following

    my barcode scanner is LS2208..... I need a code to read a data from the scanner ......

  7. #7
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    Is there an SDK available for your scanner?
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  8. #8
    Join Date
    Dec 2007
    Posts
    27
    No SDK available ......
    Its using keyboard interface ......

    i have three text box in one form .... if the focus is in textbox1 the scanner data will goto the textbox1 ..... bec the scanner using keyboard interface ... so where ever the focus the data will go there .... but i need to display the data in textbox 3 when the focus is anywhere in the form ......

    thanks

  9. #9
    Join Date
    Dec 2007
    Posts
    16
    he's trying to say that windows is automatically sending the barcode data to the active window, just by scanning something. he is trying to build a program that will intercept the scans and output the data to a textbox, or what have you... whether or not it is the active window.

  10. #10
    Join Date
    Dec 2007
    Posts
    27
    Hi

    sorry ya ..... i solved the problem any have thanks for the effort

    bye

  11. #11
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    Please post your solution as it might help others with the same, or similiar, problem.

    Thanks.
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  12. #12
    Join Date
    Mar 2008
    Posts
    2

    Intercepting barcode enter

    Please, I need the solution you found.

  13. #13
    Join Date
    Jan 2008
    Posts
    73
    Quote Originally Posted by rey012204
    Please, I need the solution you found.
    In the event that the poster doesn't reply, I think this is what you want to do. This example uses three TextBoxes, a Timer, and a CheckBox. When the Form loads the focus is put on Text3 but it won't accept any input while Check1 is un-checked. Checking Check1 enables input to Text3 and disables Text1 & 2.

    Code:
    '
    
    Option Explicit
    
    Private Sub Form_Load()
       Show
       Text3.SetFocus
       Timer1.Enabled = False
       Check1.Caption = "Input Barcode"
    End Sub
    
    Private Sub Check1_Click()
       Timer1.Enabled = True
       Timer1.Interval = 10
       If Check1.Value = 1 Then
          Text1.Enabled = False                           'Disable Text1&2 while
          Text2.Enabled = False                           'Barcode reader is reading.
       Else
          Text1.Enabled = True
          Text2.Enabled = True
       End If
    End Sub
    
    Private Sub Text3_Change()
       If Check1.Value = 0 Then Text3.Text = ""             'Don't accept any input.
    End Sub
    
    Private Sub Timer1_Timer()
       If Check1.Value = 1 Then Text3.SetFocus
       Text3.Text = ""
       Timer1.Enabled = False
    End Sub

  14. #14
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    Thanks CDRIVE!
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  15. #15
    Join Date
    May 2008
    Posts
    1

    Red face Follow up question.

    I'm a bit of a novice to code, but I know more than enough to be dangerous.
    However, on 03-25-2008 12:29 AM, "CDRIVE" posted code that "mathansj" was trying to achieve.
    How can I use this. Usually, I put code in a text file, and rename the .txt to a .vbs, or something of that nature.
    How can I take advantage of this code. Any help is appreciated. Thanks!

Similar Threads

  1. Shortest VB6 HTML scrape code
    By keystoneclimber in forum VB Classic
    Replies: 1
    Last Post: 09-27-2006, 08:33 PM
  2. Control Arrays in VB.NET
    By Gary Nelson in forum .NET
    Replies: 277
    Last Post: 10-01-2003, 12:00 AM
  3. Speaking of strings...
    By Harlow in forum .NET
    Replies: 246
    Last Post: 10-26-2002, 12:30 AM
  4. wot is CLR
    By lostguy in forum .NET
    Replies: 8
    Last Post: 04-03-2002, 06:41 PM
  5. Replies: 17
    Last Post: 01-17-2002, 03:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center