[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


creating a program for barcode

Posted on 2005-04-06
Medium Priority
Last Modified: 2013-11-18

I need to create a program to be able to generate barcode for storage media label only (Like DLT meda tape or LTO media tape). How the concept like? what language use will be easier? How to start with it?

Thanks ;)

Question by:patrick24
LVL 16

Accepted Solution

alain34 earned 500 total points
ID: 13717674
Look at this site. Could it be of any use?

LVL 10

Assisted Solution

NetworkArchitek earned 500 total points
ID: 13717676
Well you can use VB, C#, or C++ all those languages are suited for that. VB is pretty easy to get started with. What you really need is some sort of component or SDK which handles the barcode parts for you, unless you want to code that yourself. I have never worked with barcodes so I just googled for some SDK's. These may help.



To use these SDKs you'd write your application, say in VB, and basically use some SDK like these to handle the read/write/printing of them.

Assisted Solution

fceledon earned 500 total points
ID: 13719913
Being in the programming area I assume that you want to add barcode printing to your application,and nothing fancy.
There are a few dozens barcode standards in the market, from "UPC" (used in supermarket), high density 2D (like the square in UPS packages) to very simple, like the code 128.
To print a barcode, you need a special font and then print your text in a prepared string using that font.

For a simple barcode app, I'm using the font call: Code128B (C128BTT.TTF) no sure where this font came from, is dated 1993!!!
Code128 allows letters, numbers and some symbols.
Any basic bar code reader will read/decode this old standard.
The following code creates the bar code string printed using the Code128 font:
'   Add the propper prefix, suffix and parity
Public Function Code128b(txt As String) As String
    ' this routine turns a Text into a Code128B string
    Dim cd      As Long         ' check digit
    Dim i       As Long         '  temp index
    Dim tx      As String       '   local work area
    Dim txo     As String       '    output string
    Dim asx     As Long         '     ascii equivalent
    txo = ""
    cd = 0
    tx = Trim$(txt)
    If Len(tx) > 0 Then
    ' calculate the check digit
        For i = 1 To Len(tx)
            asx = Asc(Mid$(tx, i, 1)) - 32
            If asx < 0 Then
                MsgBox "Invalid Code128b String!!!" & vbLf & "Replaced by ""?"""
                asx = 31
            End If
            cd = cd + asx * i
        Next i
        cd = cd + 104           ' add the start code
        cd = cd Mod 103
        Code128b = Chr$(202) & tx & Chr$(cd + 32) & Chr$(138)
        Code128b = ""
    End If    
End Function


Author Comment

ID: 13727764
Thank guy :)

I will check it out. any more suggestion form others? ;)


Assisted Solution

WebmastuhB earned 500 total points
ID: 13759620
I have done some work with barcodes.  We needed some barcodes to be printed on some stickers for an inventory management system.

What I came up with was pretty simple.  I used Visual Basic to write a VB app (which later became a client side Active X Object for a web page).  The system would tell it which "ID number" to print as a barcode, and the Active X Object would print the sticker.

I used a free font called Free3of9. http://www.squaregear.net/fonts/free3of9.shtml

3 of 9 is a "type" of bar code that handles ascii characters.  Since I was interested only in numbers, this worked out fine for me.  Also, since some of the laser barcode readers we would be using were older, this also worked out well because 3 of 9 is an older "type" of barcode.  It scaled well to our stickers which are about 2.5 inches wide, and maybe an inch tall.

Essentially, my VB app just printed a number to a printer and used the Free 3 of 9 font.  It took some tweaking to get the font size and position correct, but once it was done, it was done.  The whole thing is simple, and works rock solid.  The software I setup has been used hundreds of times daily for about two years.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
When you discover the power of the R programming language, you are going to wonder how you ever lived without it! Learn why the language merits a place in your programming arsenal.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question