CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2004
    Posts
    2

    Unhappy printing barcode and scanning it from vb 6.0

    friends..
    i desparatle need a program on genrating a barcode and makeing it as a primary key i like to save in a database...and by scanning this barcode i could able to reteive it from database ..... i would be thinkfull if any provides it with...
    Last edited by Gangadhar007; July 18th, 2004 at 12:25 PM.

  2. #2
    Join Date
    Dec 2003
    Location
    Northern Ireland
    Posts
    1,362
    A barcode scanner should return the number of the barcode just as though you typed it into the keyboard.

    I cant help you with creating the barcode though, have you tried to find out how the barcode is encoded? Have a look at www.howstuffworks.com. You could probably find out about it there, and write a program in vb to do it.

    Good luck

  3. #3
    Join Date
    Jul 2004
    Location
    Toronto, Canada
    Posts
    16
    CorelDraw has a small prog as part of their suite that creates bar codes. If I'm not mistaken, the logic for bar codes is also there in the help files.

  4. #4
    Join Date
    Jun 2002
    Location
    Clane, Ireland
    Posts
    766
    There are various different forms of barcodes, I have included an description from WWW.AULUX.COM below.

    If you search Google for Barcode and OCX, you will find OCX products that you can add to your program, or Barcode and DLL.

    In some of the barcode scanners I've seen, they plug into the keyboard socket, and then the keyboard plugs into a socket in the scanner, so as far as your application is concerned, the information comes from the one source - don't know if they all work like this though.

    Various barcode formats:

    Industry-standard barcode formats

    Codabar
    Codabar format is commonly used in libraries, blood banks, and the air parcel business. The variable-length format allows encoding of the following 20 characters: 0123456789-$:/.+ABCD. The start and stop characters of a Codabar message must be A, B, C, or D.
    Code 25
    Code 25, also known as "Code 2 of 5," is a discrete, variable-length numeric code format. Code 25 format consists of two thick bars in a total of five bars for each encoded character. It is used primarily for inventory handling, identification of photo-finishing envelopes, airline ticketing, and baggage and cargo handling.
    Code 39
    Code 39, also known as "Code 3 of 9," is the most popular format used in the nonretail market for inventory and tracking. The format consists of three thick elementsbars or spacesin a total of nine elements for each encoded character. This bar code is used extensively in manufacturing, military, and health applications. The discrete, variable-length format will accept the following 43 characters:
    0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-.*$/+%
    The asterisk (*) is used as the start/stop character and cannot be used in the body of the bar code.
    You can also add a check digit that helps to ensure the security of the bar code. Code 39 supports Modulo 43 and xxx-nnnnnnn-c check digit formats used by US Customs for import/export shipping.
    Code 128
    Code 128 is a variable-length, high-density, alphanumeric format that is used in the shipping and labeling industry. This code has 106 bar and space patterns. Each pattern can have one of three meanings, depending on which of the three character sets is employed. One character set encodes all uppercase and ASCII control characters; another encodes all uppercase and lowercase characters; and the third set encodes the numeric digit pairs 00 through 99. The character set used is determined by the start character.
    Code 128 also lets you encode the following four function codes:
    FNC1reserved for use in European Article Numbering (EAN)
    FNC2used to instruct a bar code reader to link together the message in a bar code symbol with the message in the text symbol
    FNC3used to instruct a bar code reader to perform a reset
    FNC4used in closed system applications
    A variation of Code 128 format is EAN-128. This symbol uses the same code set as Code 128; however the function codes FNC2 to FNC4 cannot be used, and FNC1 is used as part of the start code. An advanced option of Code 128 in Barcode wizard lets you enable or disable the EAN-128 format. Cod 128 is fully supported in ASCII text.
    EAN-8
    The European Article Numbering (EAN) system is the European version of the Universal Product Code (UPC). This code is now called the International Article Number; however, the EAN abbreviation remains. EAN codes are found on European retail items.
    EAN-8 encodes eight numbers, consisting of two country-code digits, five data digits, and one check digit. In Barcode wizard, you must enter seven digits, and the eighth digitor the check digit
    is automatically generated.
    An optional two- or five-digit number can be added to the main bar code. This number is designed for use on publications and periodicals, and appears as an additional bar code to the right of the main bar code.

    EAN-13
    EAN-13 is the European version of the Universal Product Code (UPC (A)). The difference between EAN-13 and UPC (A) is that EAN-13 encodes a 13th number into the left six number of a UPC (A) symbol. The 13th number, combined with the 12th number, represents a country code.
    An optional two- or five-digit number may be added to the main bar code. This number is designed for use on publications and periodicals and appears as an additional bar code to the right of the main bar code.
    ISBN (International Standard Book Number) codes are printed on books. This format is not a separate bar code type. ISBN codes have a specific structure and are encoded using EAN-13 bar codes. The bar code is formed by a fixed three-digit country code of 978, followed by the 10-digit ISBN number. The 10th digitor the check digitis discarded. Enter the digits using the x-xxxx-xxxx format. ISBN codes must be numeric.


    UPC
    UPC (Universal Product Code) symbols are used for retail applications in the United States and Canada. UPC(A) is a 12-digit format. The symbol consists of 11 digits of data and one check digit. The first digit usually represents the type of product being identified. The following five digits are a manufacturer's code, and the next five digits are used to identify a specific product. UPC(A) codes must be numeric.
    Like UPC(A), UPC(E) is used for retail applications; however, since the bar code is smaller, it is better suited to smaller items. This format is also called "zero-suppressed," because UPC(E) compresses a 12-digit UPC(A) code into a six-digit code. UPC(E) suppresses the number-system digit, trailing digits in the manufacturer's code, and leading zeros in the product identification part of the code.
    An optional two or five-digit number may be added to the main UPC(A) or UPC(E) bar code. This number is designed for use on publications and periodicals, and appears as an additional bar code to the right of the main bar code. UPC(E) codes must be numeric.
    PDF417
    PDF417 is a high-capacity two dimensional bar code developed by Symbol Technologies, Inc. A PDF417 symbol can hold approximately 2000 characters of information, whereas a traditional linear bar code has difficulty holding more than 30 characters.
    PDF417 symbols are constructed from 4 bars and 4 spaces over 17 modules. The symbol size is from 3 to 90 rows. There is no specified minimum or maximum for X or Y dimension. With at least the recommended minimum level of error correction, the recommended Y dimension is 3X. With less than the minimum recommended level of error correction, the recommended Y dimension is 4X. A quiet zone of 2X is specified on each side of a symbol. Because of delta decode techniques the symbology is immune from uniform bar width growth.
    The key characteristic of PDF417 is its large information capacity. This also explains its name. "PDF" stands for Portable Data File. PDF417 is designed with enough capacity to contain an entire data file of information. With traditional linear bar codes, the bar code contains only a key or "license plate". The bar code is read to extract the key, and the key is used to look up the information about the object which has been marked. For example, you read the bar code on a can of peas, get a product number, and use this to look up the needed information, such as price and weight, in a database.
    With PDF417, no external database access is needed, because the PDF417 symbol can hold all the information needed an entire portable data file. A box can be labeled, for example, with a single symbol detailing all the individual items in the box.
    PDF417 is used today in a wide variety of applications, including logistics & transportation, retailing, healthcare, government, identification, and manufacturing.

    MaxiCode
    MaxiCode is an error correcting two-dimensional matrix symbol developed by UPS. It is designed specifically for sortation and tracking applications. MaxiCode symbols are constructed of codewords represented by 6 elements that are hexagonal in shape. Generally the 6 elements are arranged in three rows of two elements. Each MaxiCode symbol is of a fixed size, having 866 hexagonal elements arranged in 33 rows around a central finder pattern. Each row has a maximum of 30 elements. Each MaxiCode symbol including quiet zones shall be 32X wide by 35Y. Each element is a hexagon measuring 0.035 inch (0.89 mm) vertically and 0.040 inch (1.02 mm). The size of a MaxiCode symbol is 1.1 inch (28.14 mm) by 1.05 inch (26.65 mm). A quiet zone of 1 X/Y is specified on each side of a symbol or isolated packet.
    JP

    Please remember to rate all postings.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured