Barcode Scanner with vb6 question

 
0
 

hallo all..
i have question about connecting barcode scanner to vb6
how to connecting barcode scanner to vb6...
i use usb barcode scanner...
did i must set port or some code in vb6..???
or it works automatically..???
i need some code reference plsss...

Featured Replies in this Discussion

  • It all depends on what scanner you have, what it will be used for etc.... Have a look at these few links, might help with what you need. ... , ... or ... . It seems that you will either have to reference to the drivers or it will be linked to your keyboard automatically, all depends on what you have.
    Post Contains: Links
 
1
 

It all depends on what scanner you have, what it will be used for etc....

Have a look at these few links, might help with what you need.

Here, Here or Here.

It seems that you will either have to reference to the drivers or it will be linked to your keyboard automatically, all depends on what you have.

 
0
 

It all depends on what scanner you have, what it will be used for etc....

Have a look at these few links, might help with what you need.

Here, Here or Here.

It seems that you will either have to reference to the drivers or it will be linked to your keyboard automatically, all depends on what you have.

hmm...
it's help.., but little...
now, my problem is, how to insert data or serial number after scan with barcode to textbox..

 
0
 

Show me what code you have so far, the connection, returned values etc.

 
0
 

Private Sub Command1_Click()
On Error GoTo errHandler

'FOR WRITING
MSComm1.CommPort = 2
MSComm1.Settings = "9600,N,8,1"
MSComm1.PortOpen = True
MSComm1.Output = "Hey its working" 'Text1.Text
MsgBox MSComm1.OutBufferCount
MSComm1.PortOpen = False

'FOR READING

MSComm1.CommPort = 2
MSComm1.Settings = "9600,N,8,1"
MSComm1.PortOpen = True
MsgBox MSComm1.InBufferCount
MSComm1.InputMode = comInputModeText
'Text1.Text = MSComm1.Input
MsgBox MSComm1.Input
MSComm1.PortOpen = False

errHandler:
If Err.Number <> 0 Then
MsgBox "Error No: " & Err.Number & ", Error Description: " & Err.Description
End If
End Sub

 
0
 

Are you sure this is the correct approach, the barcode scanners I have used present the data as if it had been typed on the keyboard. ie. you set focus to a text box, scan the barcode and the barcode appears in the text box followed by a CR.

If you want to process the barcode you put some code in the LostFocus event of the text box.

 
0
 

hmm....
did barcode scanner work like keyboard..???
so after barcode scanner get the numeric of barcode, the numeric send into text1 ..??

 
0
 

Correct. Once the textbox you have that must contain the barcode value, use the scanner and it will return the value into the text box.

 
0
 

hmm..
thanks.., it's help me more...
so in the case use barcode scanner in usb, i don't need some code...
but in the other i need some code to connect barcode scanner to vb
is that right..??

 
0
 

The barcode scanner will have come with some drivers, install these and it should work as described above.

Question Answered as of 3 Years Ago by AndreRet and ChrisPadgham
 
0
 

Generally it "just works". Most USB and ps2 scanners have "keyboard wedges". They are just seen by the OS as a keyboard.

 
0
 

good day sir..cdr-king laser barcode scanner hr100b is working for the vb6. and this code is compatible for this device?

Private Sub Command1_Click()
On Error GoTo errHandler

'FOR WRITING
MSComm1.CommPort = 2
MSComm1.Settings = "9600,N,8,1"
MSComm1.PortOpen = True
MSComm1.Output = "Hey its working" 'Text1.Text
MsgBox MSComm1.OutBufferCount
MSComm1.PortOpen = False

'FOR READING

MSComm1.CommPort = 2
MSComm1.Settings = "9600,N,8,1"
MSComm1.PortOpen = True
MsgBox MSComm1.InBufferCount
MSComm1.InputMode = comInputModeText
'Text1.Text = MSComm1.Input
MsgBox MSComm1.Input
MSComm1.PortOpen = False

errHandler:
If Err.Number <> 0 Then
MsgBox "Error No: " & Err.Number & ", Error Description: " & Err.Description
End If
End Sub

 
0
 

hmm.
thanks for that information, its help me more for my thesis.
- but still i need the code to connect the bar code scanner to visual basic 6.0?
can you plz help me??

 
0
 

This thread is closed, please start a new one. Also you I believe you have the information you need above. It is for you to write the code.

You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article