From: Mike Williams on
"Saga" <antiSpam(a)nowhere.com> wrote in message
news:uT6RRM68KHA.5808(a)TK2MSFTNGP02.phx.gbl...

> They are different... Code39 allows alpha numeric data, UPC is only
> numeric
> Code 39 is open format, UPC has a set format(num system,
> manu. code, prod. code & check digit)
> UPC is USA centric.
> Encoding is also different. Regards, Saga

Right. So what do you think about the business of drawing the barcode lines
so they are all an exact number of printer pixels wide, and positioned at an
exact printer pixel position? Is that useful, or is it just not necessary
and are .ttf barcode fonts okay in that respect?

Mike




From: Henning on
If you go for the keyboard wedge type, 'encapsulate' the barcode read with
ex. prefix DC1 = Ctl-Q = ASCII 17. And a suffix ex. CR, then it's easy to
identify if the input is from the barcodescanner or the keyboard. Data
scanned by the reader will not be mixed with eventual keyboard characters.

/Henning

"Paulo" <nospam.pmpcosta(a)netcabo.pt> skrev i meddelandet
news:u$ldoW58KHA.3176(a)TK2MSFTNGP05.phx.gbl...
> Hi Helmut,
>
> Thanks for your input. I think also Code 39 will work because, customer
> Id's are numeric only (Long data type).
>
> Paulo
> -----
> _I want my Classic VB_
>
>
>
> "Helmut Meukel" <NoSpam(a)NoProvider.de> wrote in message
> news:upHhSI58KHA.5716(a)TK2MSFTNGP06.phx.gbl...
>> The simplest way to attach a barcode scanner is to use one which is
>> connected between keyboard and PC, thus being transparent for OS
>> and your app. Most scanners are able to decode different barcodes types
>> and transfer the date to the PC.
>>
>> Use for your tests the same type of scanner that will be used in
>> production!
>>
>> For printing the barcodes, try different free Truetype fonts.
>>
>> I found it's best to use the same printer type and paper as will be used
>> in
>> production and try out different font sizes. I installed the Truetype
>> fonts
>> on my PC and used Word to print the different fonts in different sizes.
>> Then I used a tiny test program to read the barcode into a textbox.
>> Some fonts made problems in some font sizes. In our case we had to use
>> colored paper - light green - and a HP Laserjet and the scanner had
>> problems
>> to read the barcodes from this paper with font sizes below 14.
>> With one font the scanner had no problem with size 12 and 15 but choked
>> with font sizes 13 and 14.
>>
>> We used Code39, because our OrderNo contained only numbers and
>> uppercase characters.
>>
>> Helmut.
>>
>>
>> "Paulo" <nospam.pmpcosta(a)netcabo.pt> schrieb im Newsbeitrag
>> news:uF6%23e828KHA.2248(a)TK2MSFTNGP05.phx.gbl...
>>> Hi, friends
>>>
>>> I want to add barcode scanning capability to a next release of my
>>> application. A barcode with the identification of the customer will be
>>> printed in a form. After to fill in the form, customer sends back the
>>> report to my client. The operator of my application should be able to
>>> read the customer identification with a barcode scanner and, at this
>>> time, should be automaticaly loaded a dialog in order the operator to
>>> update data.
>>>
>>> I am completely new to this, and have some questions:
>>>
>>> a) Is it possible to implement this?
>>> b) Which type of barcode should be used in this type of application?
>>> c) Which type of barcode scanner to buy for tests?
>>> d) How to detect if a barcode scanner device is attached to the client
>>> computer?
>>> e) How to get a barcode value in a variable in my application?
>>>
>>> Thanks for any advice,
>>>
>>> Paulo
>>> -----
>>
>>
>
>


From: Jim Mack on
Saga wrote:

> UPC is USA centric.

USA-centric in the sense that UPC barcoding originated in the US. But
for a few years now all US scanners have been able to also decode
EAN-13, the European extension to UPC. The original UPC-A will be
obsoleted and EAN-13 will be universal (called UPC-13 in North
America).

--
Jim Mack
Twisted tees at http://www.cafepress.com/2050inc
"We sew confusion"

From: Paulo on
Hi Mike,

Thanks for your answer. I'm going to consider your opinion about type of
barcode and code for drawing. In what concerns the use of a TTF, I also have
been thinking about drawing instead of printing TTF. As I have not previous
experience with this issue I think I will have to learn with tests, as much
as possible. Also, I can run some tests in the environment of a few clients,
and check what happens in different printers, and settings of operating
systems. Anyway, I will have time to do this.

Paulo
-----
_I want my Classic VB_


"Mike Williams" <Mike(a)WhiskeyAndCoke.com> escreveu na mensagem
news:%23ZZBQ$58KHA.5412(a)TK2MSFTNGP06.phx.gbl...
> "Paulo" <nospam.pmpcosta(a)netcabo.pt> wrote in message
> news:OGKFzU58KHA.3176(a)TK2MSFTNGP05.phx.gbl...
>
>> After perusal of your [David's] post and the one of Saga, I think
>> the appropriate type could be 'Code 39'. I've got the TTF font
>> also and some code.
>
> I don't know much about barcodes and I'm not sure whether your Code39 is
> similar to the only barcode I have been involved with (Universal Product
> Code?). If so then you may (or may not?) be interested in the following
> example which is something I came up with years ago in response to someone
> who was having problems with .ttf barcode fonts on a specific printer.
> This example attempts to overcome the problem of the various "lines" of
> the barcode sometimes not being quite where they should be and sometimes
> not being quite the correct thickness in relation to the others, due to
> fact of the individual barcode lines almost always not quite matching
> exactly with the printer pixels. It works by calculating an overall
> barcode width that is as close as possible to the desired barcode width
> whilst at the same time ensuring that every barcode line is an exact whole
> number of printer pixels thick. It may not be of any use to you, and it
> may not even work correctly in practice (I don't have a barcode reader to
> try it with) but here it is, for what it's worth. As the code currently
> stands it prints only to a printer (because it is really just ptototype
> code) but it will be easy to modify it to make it more flexible. Anyway,
> here is the code as I've got it so far:
>
> Mike
>
> Option Explicit
> Private chardata(0 To 9) As String
>
> Private Sub Form_Load()
> ' note that every digit in the UPC (Universal Product Code)
> ' barcode has an overall thickness of "seven thin lines" (a
> ' total of 84 "thin lines" for the 12 digits. In addition
> ' there is a total of 11 thin lines for the start, centre
> ' and stop codes. Therefore each bar code has a total
> ' thickness of 95 "thin lines".
> chardata(0) = "3211"
> chardata(1) = "2221"
> chardata(2) = "2122"
> chardata(3) = "1411"
> chardata(4) = "1132"
> chardata(5) = "1231"
> chardata(6) = "1114"
> chardata(7) = "1312"
> chardata(8) = "1213"
> chardata(9) = "3112"
> End Sub
>
> Private Sub PrintBarCode(code As String, x As Single, _
> y As Single, barwidth As Long)
> Dim oldmode As Long, nchar As Long, nline As Long, clr As Long
> Dim xp As Long, yp As Long, high As Long
> Dim wide As Long, n As Long, digit As Long
> oldmode = Printer.ScaleMode
> Printer.ScaleMode = vbPixels
> ' add code later to check for valid parameters
> xp = Printer.ScaleX(x, oldmode, vbPixels) ' convert to the nearest whole
> yp = Printer.ScaleY(y, oldmode, vbPixels) ' number of printer pixels
> high = barwidth * 60 ' typical ratio of height to width of a single line
> ' draw the "start code" of "111"
> wide = barwidth * 1
> Printer.Line (xp, yp)-(xp + wide - 1, yp + high), vbBlack, BF
> xp = xp + wide
> Printer.Line (xp, yp)-(xp + wide - 1, yp + high), vbWhite, BF
> xp = xp + wide
> Printer.Line (xp, yp)-(xp + wide - 1, yp + high), vbBlack, BF
> xp = xp + wide
> ' now print digits 1 to 6
> clr = vbWhite
> For nchar = 1 To 6
> digit = Val(Mid$(code, nchar, 1))
> For n = 1 To 4
> wide = barwidth * Val(Mid$(chardata(digit), n, 1))
> Printer.Line (xp, yp)-(xp + wide - 1, yp + high), _
> clr, BF: xp = xp + wide
> If clr = vbWhite Then clr = vbBlack Else clr = vbWhite
> Next n
> Next nchar
> ' now print the "centre code" of "11111"
> wide = barwidth * 1
> Printer.Line (xp, yp)-(xp + wide - 1, yp + high), vbWhite, BF
> xp = xp + wide
> Printer.Line (xp, yp)-(xp + wide - 1, yp + high), vbBlack, BF
> xp = xp + wide
> Printer.Line (xp, yp)-(xp + wide - 1, yp + high), vbWhite, BF
> xp = xp + wide
> Printer.Line (xp, yp)-(xp + wide - 1, yp + high), vbBlack, BF
> xp = xp + wide
> Printer.Line (xp, yp)-(xp + wide - 1, yp + high), vbWhite, BF
> xp = xp + wide
> ' now print digits 7 to 12
> clr = vbBlack
> For nchar = 7 To 12
> digit = Val(Mid$(code, nchar, 1))
> For n = 1 To 4
> wide = barwidth * Val(Mid$(chardata(digit), n, 1)) ' pixel width
> Printer.Line (xp, yp)-(xp + wide - 1, yp + high), clr, BF
> xp = xp + wide
> If clr = vbWhite Then
> clr = vbBlack
> Else
> clr = vbWhite
> End If
> Next n
> Next nchar
> ' now print the "stop code" of "111"
> wide = barwidth * 1
> Printer.Line (xp, yp)-(xp + wide - 1, yp + high), vbBlack, BF
> Printer.Line (xp, yp)-(xp + wide - 1, yp + high), vbWhite, BF
> Printer.Line (xp, yp)-(xp + wide - 1, yp + high), vbBlack, BF
> Printer.ScaleMode = oldmode
> End Sub
>
> Private Sub Command1_Click()
> ' Print a UPC (Universal Product Code) barcode
> Printer.ScaleMode = vbInches
> Dim incheswide As Single, pixwide As Long
> incheswide = 1.5 ' the desired barcode width (in inches)
> incheswide = incheswide / 95 ' barcode 95 times as wide as a thin line
> pixwide = Printer.ScaleX(incheswide, vbInches, vbPixels)
> If pixwide < 1 Then pixwide = 1
> ' print the barcode at location (1, 1) inches
> PrintBarCode "123456789012", 1, 1, pixwide
> Printer.EndDoc
> End Sub
>
>
>
>
>
>


From: Helmut Meukel on
You'll find different Code39 TTF fonts - different names and quality -
check some out.

Helmut.

"Paulo" <nospam.pmpcosta(a)netcabo.pt> schrieb im Newsbeitrag
news:u$ldoW58KHA.3176(a)TK2MSFTNGP05.phx.gbl...
> Hi Helmut,
>
> Thanks for your input. I think also Code 39 will work because, customer Id's
> are numeric only (Long data type).
>
> Paulo
> -----
> _I want my Classic VB_
>
>
>
> "Helmut Meukel" <NoSpam(a)NoProvider.de> wrote in message
> news:upHhSI58KHA.5716(a)TK2MSFTNGP06.phx.gbl...
>> The simplest way to attach a barcode scanner is to use one which is
>> connected between keyboard and PC, thus being transparent for OS
>> and your app. Most scanners are able to decode different barcodes types
>> and transfer the date to the PC.
>>
>> Use for your tests the same type of scanner that will be used in production!
>>
>> For printing the barcodes, try different free Truetype fonts.
>>
>> I found it's best to use the same printer type and paper as will be used in
>> production and try out different font sizes. I installed the Truetype fonts
>> on my PC and used Word to print the different fonts in different sizes.
>> Then I used a tiny test program to read the barcode into a textbox.
>> Some fonts made problems in some font sizes. In our case we had to use
>> colored paper - light green - and a HP Laserjet and the scanner had problems
>> to read the barcodes from this paper with font sizes below 14.
>> With one font the scanner had no problem with size 12 and 15 but choked
>> with font sizes 13 and 14.
>>
>> We used Code39, because our OrderNo contained only numbers and
>> uppercase characters.
>>
>> Helmut.
>>
>>
>> "Paulo" <nospam.pmpcosta(a)netcabo.pt> schrieb im Newsbeitrag
>> news:uF6%23e828KHA.2248(a)TK2MSFTNGP05.phx.gbl...
>>> Hi, friends
>>>
>>> I want to add barcode scanning capability to a next release of my
>>> application. A barcode with the identification of the customer will be
>>> printed in a form. After to fill in the form, customer sends back the report
>>> to my client. The operator of my application should be able to read the
>>> customer identification with a barcode scanner and, at this time, should be
>>> automaticaly loaded a dialog in order the operator to update data.
>>>
>>> I am completely new to this, and have some questions:
>>>
>>> a) Is it possible to implement this?
>>> b) Which type of barcode should be used in this type of application?
>>> c) Which type of barcode scanner to buy for tests?
>>> d) How to detect if a barcode scanner device is attached to the client
>>> computer?
>>> e) How to get a barcode value in a variable in my application?
>>>
>>> Thanks for any advice,
>>>
>>> Paulo
>>> -----
>>
>>
>
>


First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6
Prev: Followup
Next: Strange VB6 IDE crash