Chapter 7. Barcode Properties Reference

In this chapter, you will find detailed information about each barcode object property. Some properties may not be modified under certain design mode. Some properties may be related to other properties - i.e. change to one property will change other properties. For example, changing Symbology property will also alter the value of Message property.

7.1. List of Properties

Table 7.1. List of Barcode Object Properties

BackColorSpecifies the background color for the control.
BarHeightSpecifies the height of the bars in the control, in user units.
BearerBarsDetermines whether to include the bearer bars around the barcodes. Applicable on selected symbologies.
BorderColorSpecifies the border color.
BorderStyleSpecifies the border style.
BorderWidthSpecifies the border width, in logical units.
Code25OptionalCheckDigitDetermines whether to include an optional checksum digit in all Code25 barcodes.
Code39OptionalCheckDigitDetermines whether to include an optional checksum digit in all Code 39 barcodes.
Code39StartStopCharsDetermines whether to display the start and stop characters in the human readable of all code 39 barcodes.
CommentSpecifies the text string for the human readable comment printed around the barcode.
CommentAlignmentDetermines how the comment are aligned.
CommentFontSpecifies the font used to draw comment text.
CommentMarginBottomSpecifies the margin on the bottom of the comment box.
CommentMarginLeftSpecifies the margin on the left of the comment box.
CommentMarginRightSpecifies the margin on the right of the comment box.
CommentMarginTopSpecifies the margin on the top of the comment box.
CommentOnTopDetermines whether the comment box is placed above the barcode image.
FontSpecifies the font used to draw human readable text.
ForeColorSpecifies the foreground color of the control.
I2of5OptionalCheckDigitDeprecated in version 3.6.
MessageSpecifies a string which represents the data to be encoded.
NarrowBarWidthSpecifies the width of the narrowest module in linear symbologies.
NarrowToWideRatioSpecifies the ratio used to calculate the width of the wide element. Applicable on selected symbologies.
QuietZonesDetermines whether to include quiet zones in the barcodes.
RasterImageResolutionSpecifies the resolution which is used to export raster images.
RotationSpecifies the rotation direction and degrees.
ShowCheckDigitDetermines whether to include the checksum character in the human readable.
ShowCommentDetermines whether the control displays the comment element.
ShowHRTextDetermines whether to display the human readable text.
SymbolMarginBottomSpecifies the margin on the bottom of the symbol.
SymbolMarginLeftSpecifies the margin on the left of the symbol.
SymbolMarginRightSpecifies the margin on the right of the symbol.
SymbolMarginTopSpecifies the margin on the top of the symbol.
SymbologySpecifies the barcode format (symbology).
TexAlignmentSpecifies how the human readable text is aligned.
TextOnTopDetermines whether the human readable text is placed above the barcode image.
UccEanOptionalCheckDigitDeprecated in version 3.6

7.2. BackColor, ForeColor Properties

Description

BackColor - returns or sets the background color of the control.

ForeColor - returns or sets the foreground color of the control.

Remarks

For opening systems, we strongly recommend to set the background color to solid white (0xFFFFFF) and foreground color to black (0x000000). Note: barcode requires decent contrast between the foreground color and the background color, in order to be readable. Always test the readability thoroughly when you select a color pair different from black and white.

7.3. BarHeight Property

Description

Returns or sets a value for the height of bars in barcode control.

Remarks

The BarHeight property specifies the height of the dark elements in all linear symbologies with exception (see notes below). The actual value is affected by the Measurement property. If Measurement is set to mbxMeasureEnglish, the unit for this property is mils (1/1000 inch), otherwise it is 1/1000 cm. The default value is 1000 which translates to 1 inch or 1 cm, depending on the measurement unit specified.

This property have no effect on the size of two-dimensional barcodes, such as PDF417, DataMatrix and MaxiCode.

The height of elements in postal symbologies (POSTNET and RoyalMail) is fixed. Therefore, changing this property has no effect on those types of barcodes.

The height of bars in a DataBar Truncated symbol is fixed at 13X (X is the industry term for NarrowBarWidth), and the height of a DataBar Stacked symbol is fixed at 50X. Therefore, this property does not affect the height of those two types of symbols.

In stacked symbologies (DataBar Stacked Omnidirectional and DataBar Expanded (multi-row), the overall height is the number of rows multiplying BarHeight, plus the height of any required separator rows.

7.4. BearerBars Property

Description

Returns or sets a value that determines whether to include bearer bars around the barcode.

Remarks

Bearer bars (see below) are horizontal bars printed across the top and bottom of the barcode image. Bearer bars can help to avoid partial reading, should the reader move off the top or bottom of the code. Only certain symbologies require bearer bars (for example Interleaved 2 of 5), because the start and stop characters in most barcodes make bearer bars unnecessary.

In Barcode Creator, the following symbologies can have bearer bars: Codabar, Code11, Code25, Code128, UCC/EAN-128, Code39, Code39 HIBC, Code 39 Full ASCII, Code93, Interleaved 2 of 5, MSI/Plessey and Telepen. Other symbologies ignore this property.

7.5. BorderColor Property

Description

Returns or sets the color of borders.

Remarks

Use this property to specify the border color. The default value is 0 (black).

See Also

Section 7.7, “BorderWidth Property”

Section 7.6, “BorderStyle Property”

7.6. BorderStyle Property

Description

Returns or sets a value that determines the border style.

Remarks

Use BorderStyle property to specify the border style. This property is set by using one of the BorderStyle enumeration values:

Table 7.2. Border Styles

ConstantValueDescription
mbxBorderStyleNone0No border lines
mbxBorderStyleSolid1Solid line
mbxBorderStyleDash2Dash line
mbxBorderStyleDot3Dot line
mbxBorderStyleDashDot4Dash dot line
mbxBorderStyleDashDotDot5Dash dot dot line

See Also

Section 7.5, “BorderColor Property”

Section 7.7, “BorderWidth Property”

7.7. BorderWidth Property

Description

Returns or sets the value for border width.

Remarks

Use BorderWidth property to specify a border width. The border width is expressed in logical units prescribed by the Measurement property. For example, if you set this property to 15 and the Measurement is mbxMeasureEnglish, the border width is 15 mils (0.015 inch). The default value is 15.

To disable the border, set BorderWidth to 0 or BorderStyle to mbxBorderStyleNone.

See Also

Section 7.6, “BorderStyle Property”

Section 7.5, “BorderColor Property”

7.8.  Code25OptionalCheckDigit Property

Description

Returns or sets a value that determines whether to include an optional checksum digit in all Code25 barcodes produced by Barcode Creator.

Remarks

A code 2 of 5 barcode can have an optional check digit. When the Code25OptionalCheckDigit is TRUE, a check digit is calculated using modulo 10 algorithm and added to a code 2 of 5 barcode. To display the checksum digit in the human readable text, set ShowCheckDigit to TRUE.

See Also

Section 8.7, “MSI/Plessey, Code 25 and Code11”

7.9. Code39OptionalCheckDigit Property

Description

Returns or sets a value that determines whether to include an optional checksum digit in all Code39 barcodes produced by Barcode Creator.

Remarks

A code 3 of 9 symbol can have an optional check digit (character) at the end of the barcode. When the Code39OptionalCheckDigit property is set to TRUE, a check digit is calculated using modulo 43 method and appended to the end of the barcode. To display the checksum digit, set ShowCheckDigit to TRUE.

This property affects two symbologies: Code 39 and Code39 Full ASCII.

See Also

Section 8.2, “Code 39”

Section 8.3, “Code 39 Full ASCII”

7.10. Code39StartStopChars Property

Description

Returns or sets a value that determines whether to display the start and stop characters in the human readable text in all Code39 barcodes produced by Barcode Creator.

Remarks

For historical reasons, many code39 symbols print start/stop characters (asterisks) at the beginning and the end of the human readable text. While the start and stop characters are always present in the barcode, it is not necessary for them to appear in the human readable. When the Code39StartStopChars property is set to TRUE, the asterisks are displayed at both the beginning and end of the human readable.

This property affects the three Code39 symbologies - Code 39, HIBC and Code39 Full ASCII.

Note

The asterisks are not part of the encoded data. You should not include asterisks in Message property when creating Code39 barcodes.

See Also

Section 8.2, “Code 39”

Section 8.4, “Code 39 HIBC”

Section 8.3, “Code 39 Full ASCII”

7.11. Comment Property

Description

Returns or sets a string for the comment to be printed around the barcode symbol.

Remarks

In addition to the human readable, which always reflects the encoded data and conforms to the standard requirements, you can optionally place a paragraph of text beside the barcode image.

You may adjust margins around the comment, place the comment on the top or bottom, modify the font typeface as well as the size, and change how the text is aligned.

Control characters are not printed.

Note

It is now possible to enter multiple paragraphs in the comment by inserting \n at the end of each paragraph (except the last one). For example, the string First paragraph\nSecond Paragraph renders two paragraphs, as illustrated below:

See Also

Section 7.13, “CommentFont Property”

Section 7.12, “CommentAlignment Property”

Section 7.25, “ShowComment Property”

Section 7.15, “CommentOnTop Property”

Section 7.14, “CommentMarginTop, CommentMarginBottom, CommentMarginLeft, CommentMarginRight Properties”

7.12. CommentAlignment Property

Description

Returns or sets a value indicating how the comment is aligned.

Remarks

This property controls how the text in the comment portion is aligned. Valid alignment choices are listed in the table below:

Table 7.3. CommentAlignment Options

ConstantValueDescription
mbxAlignLeft0Left alignment (default). Align the text to the left edge of the comment box.
mbxAlignRight1Right alignment. Align the text to the right edge of the comment box.
mbxAlignCenter2Center alignment. Align the text to the center of the comment box.
mbxAlignJustify3Justify alignment. Align the text to both edge of the comment box.

7.13. CommentFont Property

Description

Returns or sets the font for comment text.

Remarks

The default font used to draw comment text is typeface of Arial, 8 points.

This property is used to retrieve/set the font used for comment text. To set/retrieve the font used for human readable text, use Font property.

7.14. CommentMarginTop, CommentMarginBottom, CommentMarginLeft, CommentMarginRight Properties

Description

These four properties control the margins around the comment box.

Remarks

The above four parameters control the margins around the comment text box.

7.15. CommentOnTop Property

Description

Returns or sets a value that determines whether the comment box is placed above or below the symbol.

Remarks

The default value for CommentOnTop is FALSE. To place the comment on top of the image, set this property to TRUE.

7.16. Font Property

Description

Returns or sets the font for human readable text.

Remarks

The default font used to draw human readable text is typeface of Arial, 9 points. Generally speaking, you should use a sans-serif font for human readable text. Some industries require OCR-B(Optical Character Recognition Revision B) font to be used.

This property is used to retrieve/set font for human readable text. To set /retrieve font used for comment, use CommentFont property.

See Also

Section 7.26, “ShowHRText Property”

Section 7.29, “TexAlignment Property”

Section 7.30, “TextOnTop Property”

7.17. I2of5OptionalCheckDigit Property

Description

Deprected since 3.6.

Remarks

Previously, in order to add check digit to an Interleaved 2 of 5 bracode, you need to set this property to TRUE. Interleaved 2 of 5 symbology requires the input to be even length. If this property is TRUE and the input already has even length, the previous implement appends a '0' at the end, and calculate the check digit. This is an unexected behavior for many customers.

In version 3.6 and above, this property has no effect on the barcode created. Whether or not a check digit is required depends on if the length of the input is even or odd. If the length is even, no check digit is added and Barcode Creator encodes as is. If the length is odd, however, the program calculates the check digit and automatically appends at the end to make the whole length even.

See Also

Section 8.13, “Interleaved 2 of 5 (ITF25)”

7.18. Message Property

Description

Returns or sets a string for the message to be encoded.

Remarks

Not all symbologies are capable of encoding all characters. Some may only encode numeric data. Some impose a limit on the length of the encoded data. If you encode data with invalid characters or length, Barcode Creator returns an error.

  • UPC symbologies (UPC-A, UPC-E, EAN-13, EAN-8)

    A UPC symbol may have an optional 2-digit or 5-digit add-on barcode. To create an add-on barcode, separate the main data and the extension data with a vertical bar. For example, the input 1-932111-39-5|55999 produces a Bookland barcode with a 5-digit add-on symbol.

  • GS1-128 symbology

    To ensure the human readable format is correct, the AI and field ID must be enclosed with parentheses ( () ). If the data is formatted incorrectly, you may end with an error. For example, the following data is valid for UCC/EAN 128 message input:

    (01)12345678901231

    Additional information is also needed to create a shortest possible barcode. Refer to Section 8.12, “UCC/EAN-128” for more details.

  • Tilde codes

    Tilde code sequence can be used to enter special characters, such as extended ASCII characters and symbology-specific characters if supported. See each Symbology section for details.

7.19. NarrowBarWidth Property

Description

Returns or sets a value for the width of the narrowest module in linear symbologies.

Remarks

This property defines the width of the narrowest element in a linear barcode - a.k.a X-dimension. The measurement unit is in either 1/1000 inch or 1/1000 cm depending on the Measurement unit used.

By default the value for this property is 13. The valid range is from 1 to 1000. Industry standards require that the barcodes used in an open system have a X-dimension at least of 10 mils (one-hundredth of inch). If the X-dimension is too small, some scanners may have problems reading the barcode.

This property affects most linear symbologies. Height-modulated postal barcodes, such as POSTNET and Royal Mail barcodes, use fixed pitch; thus this property has no effect on these symbologies.

7.20. NarrowToWideRatio Property

Description

Returns or sets the ratio of the wide to narrow bar in a barcode.

Remarks

Some linear symbologies can have two module widths. The width of the wide one is a fixed multiple of the width of the narrow module (NarrowBarWidth). You can choose a value ranging from 2.0 to 3.0 for this ratio.

This property is valid only for Code 39, Code 25, Code 11, Codabar and Interleaved 2 of 5 symbologies. All others ignore this property. We also recommend you set a value between 2.5 to 3.0, so the barcode can be easier to be recognized.

Since the value may impact the readability of the barcode, we highly recommend that you test the barcode readability when you set the value to anything below 2.5.

7.21. QuietZones Property

Description

Returns or sets a value that determines whether to include quiet zones on the barcodes generated.

Remarks

For linear barcodes, quiet zone is defined as a clear space that precedes the start character of a barcode symbol or follows the stop character. For two-dimensional barcodes, quiet zones are clear area around the barcode. The spaces are required to help scanner determine where the barcode starts and stops.

The width of space added is 10 times the NarrowBarWidth value for all linear barcodes, 2 times PDFModuleWidth value for PDF417 barcodes, 2 times DataMatrixModuleSize value for DataMatrix barcodes and 1 element width for MaxiCode barcodes. Setting this property to TURE, substantially increase the barcode length for linear symbologies.

You can also use symbol margins to create effective quiet zones. By default Barcode Creator set the symbol margins to 100 mils at 4 directions. When this is the case, you may safely set this property to FALSE to better align the comment and human readable text.

7.22. RasterImageResolution Property

Description

Returns or sets a value that corresponds to the resolution (in pixels per inch) of the target device when export barcode images to a raster graphics file format (JPEG, GIF, PNG, TIF and BMP).

Remarks

When you export the barcode image into a raster graphics file format, such as JPG, GIF and PNG, you are converting the drawing commands (device independent) to an array of pixels which are device dependent. The size of a pixel varies based on the device and usually is measured by dot per inch (dpi). A laser printer usually has a high resolution of 300 dpi, while the screen has a low resolution of 96 dpi. As a result, an image may have different physical sizes when displayed on the screen than printed. The greater the resolution is, the bigger the file size and the accurate of the details. We suggest you set this property to the value which matches your printer.

The default value for this property is 300.

See Also

7.23. Rotation Property

Description

Returns or sets a value indicating how to rotate the working area.

Remarks

This property controls how the working area is rotated. Valid rotation choices are:

Table 7.4. Roation Options

CosntantValueDescription
mbxRTZeroDegree0No rotation
mbxRTAntiClockwise_901Rotate at 90 degrees angle counterclockwise
mbxRTAntiClockwise_1802Rotate at 180 degrees angle counterclockwise(upside down)
mbxRTAntiClockwise_2703Rotate at 270 degrees angle counterclockwise

7.24. ShowCheckDigit Property

Description

Determines whether the checksum characters will be shown on the human readable portion. This option is effective to selected symbologies only.

Remarks

Different symbologies have different rules regarding check digit. For some symbologies, check digit is part of the data and should always be included in the human readable text. Some symbologies allow optional check digit. Some symbologies require check character not be displayed at all.

  • Check digit is part of data and is always displayed.

    This category includes UPC-A, UPC-E, EAN-13, EAN-8, Bookland, and UCC/EAN-128. This property has no effect on these symbologies.

  • Check digit is required, but not treated as part of data and is never included in the human readable text.

    This category includes Code 128, Telepen and Telepen Numeric.

  • Check digit is required, and can be optinally included into the human readable text.

    This category includes Code 93, Code 11, POSTNET, PLANET and MSI/Plessey.

  • Check digit is optional, and can be optionally included in the human readable text.

    This category includes Code 39, Code 39 Full ASCII, HIBC.

In version 3.6, there are some noteable changes:

  • Previously, HIBC barcodes may turn off its check digit in the human readable display (although the check digit always appear in the barcode). After 3.6, the check digit is always included in the human readable text, as required by the standard.

  • Before 3.6, whether a UCC/EAN-128 check digit is calculated depends on UccEanOptionalCheckDigit. After version 3.6, the check digit is always included in the human readable text.

See Also

Section 7.26, “ShowHRText Property”

Section 7.8, “ Code25OptionalCheckDigit Property ”

Section 7.9, “Code39OptionalCheckDigit Property”

Section 7.17, “I2of5OptionalCheckDigit Property”

7.25. ShowComment Property

Description

Returns or sets a value that determines whether the symbol displays the comment portion.

Remarks

Toggle this property to turn on or turn off the display of the comment portion. Note that if this property is FALSE, comment margins will not be included during the position calculation of other components, such as working area, bar code image etc. If you want to have these margins participate the calculation and do not want to see the comment, set Comment property to an empty string instead.

7.26. ShowHRText Property

Description

Returns or sets a value that determines whether the symbol displays the human readable portion.

Remarks

Toggle this property to turn on or turn off the display of the human readable text.

Two dimensional barcodes do not have the concept of human readable. Consequently this property has no effect on 2D barcodes.

Per standard, UPC-A, UPC-E, EAN-13, EAN-8 barcodes and their supplements should always have the human readable as an integrated part of the image. In versions prior to 3.2, you can not produce these barcodes without visible human readable, even you set ShowHRText to FALSE. This behavior has changed since version 3.2. Unless you have absolute reason to turn it off, you should set ShowHRText to TRUE when creating these types of barcodes.

Note

The width of human readable text portion never exceeds the barcode length. If the barcode length is too small, the text will wrap into multiple lines. If this is not desired, reduce the font size, or place the human readable text into comment and adjust comment margin properties to increase the width of comment box so that the text stays in one line.

7.27. Symbology Property

Description

Returns or sets a value indicating the type of the barcode format (symbology) to be generated by the ActiveX control.

Remarks

The Barcode Creator currently supports the following symbologies:

Table 7.5. Symbology Options

ConstantValueDescription
mbxCode390(default) Code 39 (43 character set)
mbxCode39_Full_ASCII1Code 39 Full ASCII
mbxCode39_HIBC2Code 39 Mod 43 (Health Industry Bar Code)
mbxCodaBar3Codabar
mbxCode934Code 93
mbxCode1285Code 128
mbxUCC_EAN_1286UCC/EAN 128
mbxInterleaved_2of57Interleaved 2 of 5 (ITF25)
mbxUPC_A8UPC-A
mbxUPC_E9UPC-E
mbxEAN_1310EAN/JAN-13
mbxEAN_811EAN/JAN-8
mbxBookland12Bookland
mbxTelepen13Telepen
mbxTelepenNumeric14Telepen Numeric (double density)
mbxPostnet20PostNET (barcode used by USPS)
mbxPlanet21Planet (used by USPS for package tracking)
mbxRoyalMail22Royal Mail (U.K. Postal)
mbxMSI_Plessey30MSI/Plessey
mbxCode2531Code 25
mbxCode1132Code 11

Some symbologies only encode certain limited set of characters, such as digits. Some symbologies impose limit on the data length; some require checksum characters. If you are not familiar with the symbologies you are working on, refer to Chapter 8, Barcode Technologies to get some hands-on information.

7.28.  SymbolMarginTop, SymbolMarginBottom, SymbolMarginLeft, SymbolMarginRight Properties

Description

These four properties control the margins around the symbol boundary (including barcode, human readable and comment).

Remarks

These four parameters control the margins around the symbol (barcode, human readable and comment).

7.29. TexAlignment Property

Description

Returns or sets a value indicating how the human readable text is aligned.

Remarks

This property controls how the text in the human readable portion is aligned. Valid alignment choices are:

Table 7.6. TexAlignment Options

ConstantValueDescription
mbxAlignLeft0Left alignment (default). Align the text with left edge of the comment box.
mbxAlignRight1Right alignment. Align the text with the right edge of the comment box.
mbxAlignCenter2Center alignment. Align the text with the center of the comment box
mbxAlignJustify3Justify alignment. Align the text to both edge of the comment box.

Because of the unique character arrangement in UPC/EAN symbologies, this property does not apply to those symbologies: UPC-A, UPC-E, EAN-13 and EAN-8.

The barcodes below illustrate the effects of TexAlignment:

See Also

Section 7.16, “Font Property”

Section 7.26, “ShowHRText Property”

7.30. TextOnTop Property

Description

Returns or sets a value that determines whether the human readable text is placed above the barcode image or below the image.

Remarks

The default value for TextOnTop is FALSE ,which places the human readable text below the barcode. To place the human readable text above the barcode, set TextOnTop to TRUE.

See Also

Section 7.16, “Font Property”

Section 7.26, “ShowHRText Property”

Section 7.29, “TexAlignment Property”

7.31. UccEanOptionalCheckDigit Property

Description

Deprecated since version 3.6.

Remarks

Before version 3.6, This property kicks in when all the following conditions are met: (1) The current symbology is set to UCC_EAN_128. (2) The data element contains an AI of 00 (SSCC-18) or 01(SCC-14). (3) The data length is 1ess than the required. The check digit is calculated based on Mod 10 algorithm and appended to the end of the data part. The check digit also appears in the human readable text.

In version 3.6 and above, this property kick in automatically when the program finds that the input is 1 digit short. Setting the property does not change the program behavior.