Tech Support > Computers & Technology > Programming > Generating Barcode
Generating Barcode
Posted by Aman on October 6th, 2004


I want to know that how can i generate the barcode for my VB
applications. I want it for my project library management(Creating
Barcodes For The Books).

Posted by Georg Scholz on October 6th, 2004


I'd use a ready-made ActiveX control.
There are many vendors who provide such controls.
Perhaps you'll find even a freeware solution.

Try a Google search:

http://www.google.com/search?hl=en&q=barcode+activex

Georg Scholz

Posted by Programmer Dude on October 6th, 2004


Georg Scholz writes:

There are even fonts available for the more common barcodes that
let you just print the barcodes like you would print anything else.


Posted by Alek Szymanski on October 19th, 2004


Hello,


There are two basic ways of generating barcodes in VB:
1. Barcode font. The easiest font to use is Code 39. The only
requirement for Code 39 is that you use an asterisk "*" before and
after the data you wish to encode. So, for example, to encode 12345
into a barcode with that value, you can simply type *12345* into the
text box on your form. You also need to make sure the Font property
of the text box is set to the corresponding Code 39 font.
One more thing to keep in mind is that if you wish to encode a space
character, you will need to substitute it with (usually) an underscore
"_".
So, if you wish to encode "123 ABC", you'll have to change it to
"*123_ABC*"

You can set up a simple function to encode the data:

Public Function FormatCode39(d As String) As String
FormatCode39 = "*" & Replace(d, " ", "_") & "*"
End Function

That's all there is to it.
Of course, if you need fonts other than Code 39, it becomes more
complicated. You may need to calculate the check digit(s) and do
other calculations.

2. The second, and easier way to add barcodes to VB is by using an
ActiveX Control (a plug-in). You simply go to Project->Components,
and select "BarcodeWiz 1.60 Type Library".

There is no need to insert start/stop characters nor any other
calculations/substitutions. You can also choose the barcode type,
such as Code 39, Code 128, UPC, EAN 128, Codabar (used commonly in
libraries), and others. Most barcode ActiveX controls support several
different symbologies.

With an ActiveX control, you can also control many other properties of
the barcode, such as bar width, height, type of border, color, fonts,
orientation, text position, and more.

If you'd like to try either our Code 39 fonts or the barcode ActiveX
control, please have a look at our download page:

http://www.barcodewiz.com/demo.asp

Both downloads include several examples of use in Visual Basic 6.
Also, the help file includes step-by-step instructions for setting
everything up.

If you have any questions, please don't hesitate to ask.

Alek Szymanski
http://www.barcodewiz.com

Posted by Bernhard on October 20th, 2004


amandeep_dilse@yahoo.com (Aman) wrote in message news:<f6b2adf2.0410060611.185e70a9@posting.google. com>...
Try Virtual Print Engine from IDEAL Software. It can generate and
print a huge number of different barcode types (requires at least the
Enhanced Edition).

Bernhard

Posted by Thomas Lutz on November 16th, 2004


The best way to print bar codes from a VB6 app is to use a bar code
ActiveX control.
The best bar code ActiveX control available is the TAL Bar Code
ActiveX control. You can download a trial version from complete with a
VB6 sample that shows how to use it:
http://www.taltech.com/products/activex_barcodes.html



On 20 Oct 2004 09:50:13 -0700, bschm74@gmx.net (Bernhard) wrote:



Similar Posts