|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
barcode scanner
how do barcode scanner scan the code?what sensor or technology they are using?can help me...
![]() |
|
#2
|
|||
|
|||
|
Actually, you don't need to know what sensor it has, the way barcord reader works, and so on, unless you are going to make your own barcode reader.
![]() There are several types among barcode reader things like PS/2, Serial(RS232C type), USB, and even compact flash memory type too. With my some experiences, PS/2 type(keyboard type) barcode reader was easist way to go on. You only need "keypress" or "change" event on "textbox" control in VB. Chiaoooo. |
|
#3
|
|||
|
|||
|
To program something using a barcode reader just think this: It is exactly the same as typing in a text box. A scanner should first be hooked up to your computer. It will scan the barcode and *providing that the text box has focus* I.E. the cursor is blinking inside the text box, it will translate the barcode into a useable code. You will have to have the forms keypress property set to "True" on each form that you wish to use the scanner. This will allow you to catch the changing of the text box. Hope this helps.
__________________
Best regards, Russ Bergen Senior Software Developer and Webmaster |
|
#4
|
||||
|
||||
|
This holds true for only 1D barcodes though. You will have to do some parsing for 2D barcodes it you intend on using them.
|
|
#5
|
|||
|
|||
|
There are some good articles in www.barcodeschool.com
. You may want to check out them. The keyboard wedge is easy to use, they simply put the input into the keyboard buffer. However, the input box must have the input focus all the time. RSC232 programming is easy once you know how to add MSCOMM32 into your application. You may want to post your question at http://forum.morovia.com. There are some experts on that forum. |
|
#6
|
||||
|
||||
|
well, if you're using an MSComm control, then it's a little more complicated than that, ut
. You have to remember to set things like parity bits, number of bits per word, stop bits, and the like, or else, barcode number 135233321531 might end up "as ;laksjd;flkajs;dlkfja;sldkjf;alskjdf" (over-exaggeration)
__________________
Fisherman "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." - A.Einstein |
|
#7
|
|||
|
|||
|
Actually MSCOMM is easy. Using default settings, under most circumstances, produces the correct results.
Two problems associated with keyboard wedge - (1) the input focus; (2) you can only associate one scannner to the computer. With RS232 you fully control the input. |
|
#8
|
||||
|
||||
|
I can tell you this much. I've got a Welch Allyn test scanner here that can scan virtually any barcode, in any format. I have 4 programs in use that utilize the MSComm Control, and I got some very interesting results until I intialized everything correctly. There may not be any trouble with other scanners, but I know that it doesn't always work .
![]() |
|
#9
|
|||
|
|||
|
Hi,
I have a related question, will the CRLF of the scanner be interpreted as Enter key by the VB.NET application? I need to capture the CRLF from the scanner so that a function will automatically be triggered. Could anyone help me? Thanks. ![]() |
|
#10
|
||||
|
||||
|
if it isn't, then try using the Ascw() function to determine the Ascii value of the character you are looking at
|
|
#11
|
|||
|
|||
|
thanks for the reply Fisherman...
I will try that... thanks again ![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > barcode scanner |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|