EDN Admin
Well-known member
Hey guys as some of you already know Im creating an EPOS system and nearing the end of the application.
I need to connect my newly acquired barcode reader to the form in vb.net so that whenever I scan an item in the items ID number appears in the necessary textbox.
After some research I have bought the relevant barcode reader making sure it supports the relevant barcodes including retail.
I have plugged it into the computer through the usb port, it has installed automatically all of the relevant drivers, and below is the code Im using in vb.
The below code is include for where the form loads up:
<div style="overflow:auto;background-color:white;line-height:100% ! important;font-family:Courier New;font-size:11px <table style="border-width:0px;margin:2px 0px;width:99%;border-collapse:collapse;background-color:rgb(255, 255, 255)" cellpadding=0 cellspacing=0><col style="font-family:Courier New;font-size:11px;padding-left:10px;white-space:nowrap <tbody><tr><td><font style="font-size:11px </font><font style="color:red Me.KeyPreview</font><font style="font-size:11px = </font><font style="color:blue True</font><font style="font-size:11px </font></td></tr></tbody></table>
And the below code in the form itself
<div style="overflow:auto;background-color:white;line-height:100% ! important;font-family:Courier New;font-size:11px <table style="border-width:0px;margin:2px 0px;width:99%;border-collapse:collapse;background-color:rgb(255, 255, 255)" cellpadding=0 cellspacing=0><col style="font-family:Courier New;font-size:11px;padding-left:10px;white-space:nowrap <tbody><tr><td><font style="font-size:11px Private Sub Form_KeyPress(ByVal KeyAscii As Integer) </font></td></tr><tr><td style="background-color:rgb(247, 247, 247) If <font style="color:red KeyAscii</font><font style="font-size:11px = </font><font style="color:blue 126</font><font style="font-size:11px Then </font></td></tr><tr><td> <font style="color:red KeyAscii</font><font style="font-size:11px = </font><font style="color:blue 0</font><font style="font-size:11px </font></td></tr><tr><td style="background-color:rgb(247, 247, 247) <font style="color:red txtSearch.Text</font><font style="font-size:11px = </font><font style="color:blue InputBox</font><font style="font-size:11px ("Enter Data:") </font></td></tr><tr><td> End If </td></tr><tr><td style="background-color:rgb(247, 247, 247) End Sub </td></tr></tbody></table>
I have also used the .focus() feature to focus attention on the textbox.
Incase the problem is the barcode I am trying to scan in is the problem, using an image generator I have printed out other bar codes including code 128, UPCA, UPCE, 39 and EXT 39, however still dont have any luck.
I opened notepad, and tried scanning in the barcode into there, however that didnt work either.
Does anybody have any ideas, or know where the problem is? The fact that I cant scan any barcodes into an easy application like notepad, is it a hint that the barcode reader isnt connected at all?
Im open to advise and look forward to your replies.
Thanks guys
George
<hr class="sig Hmmm not sure about this one
View the full article
I need to connect my newly acquired barcode reader to the form in vb.net so that whenever I scan an item in the items ID number appears in the necessary textbox.
After some research I have bought the relevant barcode reader making sure it supports the relevant barcodes including retail.
I have plugged it into the computer through the usb port, it has installed automatically all of the relevant drivers, and below is the code Im using in vb.
The below code is include for where the form loads up:
<div style="overflow:auto;background-color:white;line-height:100% ! important;font-family:Courier New;font-size:11px <table style="border-width:0px;margin:2px 0px;width:99%;border-collapse:collapse;background-color:rgb(255, 255, 255)" cellpadding=0 cellspacing=0><col style="font-family:Courier New;font-size:11px;padding-left:10px;white-space:nowrap <tbody><tr><td><font style="font-size:11px </font><font style="color:red Me.KeyPreview</font><font style="font-size:11px = </font><font style="color:blue True</font><font style="font-size:11px </font></td></tr></tbody></table>
And the below code in the form itself
<div style="overflow:auto;background-color:white;line-height:100% ! important;font-family:Courier New;font-size:11px <table style="border-width:0px;margin:2px 0px;width:99%;border-collapse:collapse;background-color:rgb(255, 255, 255)" cellpadding=0 cellspacing=0><col style="font-family:Courier New;font-size:11px;padding-left:10px;white-space:nowrap <tbody><tr><td><font style="font-size:11px Private Sub Form_KeyPress(ByVal KeyAscii As Integer) </font></td></tr><tr><td style="background-color:rgb(247, 247, 247) If <font style="color:red KeyAscii</font><font style="font-size:11px = </font><font style="color:blue 126</font><font style="font-size:11px Then </font></td></tr><tr><td> <font style="color:red KeyAscii</font><font style="font-size:11px = </font><font style="color:blue 0</font><font style="font-size:11px </font></td></tr><tr><td style="background-color:rgb(247, 247, 247) <font style="color:red txtSearch.Text</font><font style="font-size:11px = </font><font style="color:blue InputBox</font><font style="font-size:11px ("Enter Data:") </font></td></tr><tr><td> End If </td></tr><tr><td style="background-color:rgb(247, 247, 247) End Sub </td></tr></tbody></table>
I have also used the .focus() feature to focus attention on the textbox.
Incase the problem is the barcode I am trying to scan in is the problem, using an image generator I have printed out other bar codes including code 128, UPCA, UPCE, 39 and EXT 39, however still dont have any luck.
I opened notepad, and tried scanning in the barcode into there, however that didnt work either.
Does anybody have any ideas, or know where the problem is? The fact that I cant scan any barcodes into an easy application like notepad, is it a hint that the barcode reader isnt connected at all?
Im open to advise and look forward to your replies.
Thanks guys
George
<hr class="sig Hmmm not sure about this one
View the full article