Code 128 Barcode FAQ for Winforms

.NET Barcode Component for .NET Winforms, Code 128 Barcode Image, Data, and Size Issues
Terrek Barcode for Winforms - Code 128 Barcode FAQ
Code 128 Barcode Generator for Winforms was developed and promoted by Terrek. This robust .NET control library is capable of printing Code 128 with accuracy and precision in .NET Windows applications. The production of barcode is a image rather than a font.
The following aspects of Code 128 barcode generation in .NET Winform are presented in this walkthrough:
  • Code 128 in Winforms Control Library - Data Encoding Support
  • Code 128 in Winforms Control Library - Barcode Scaling Support
  • Code 128 in Winforms Control Library - Image Setting Support
  • Code 128 in Winforms Control Library - Solution Projects Support
Terrek also provides more Code 128 barcode generators for solutions in distinct developing environments, including Code 128 Crystal Report CRI, Code 128 Java SDK, Code 128 Excel Add-in, and Code 128 Word Add-in.
Code 128 in Winforms Control Library - Data Encoding Support
Valid Data of Code 128
  • Standard ASCII values: 0-128
    • 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
    • Uppercase letters (A - Z)
    • Lowercase letters (a - z)
    • - (Dash), $ (Dollar), % (Percentage), (Space), . (Point), / (Slash), + (Plus)
  • Extended ASCII Values in accordance with ISO 8859-1: 128-255
Code 128 Code Set
Three code sets are used in Code 128 encoding to represent above values, and they are:
  • 128A (Code Set A) - ASCII characters 00 to 95 (0-9, A-Z and control codes), special characters, and FNC 1-4
  • 128B (Code Set B) - ASCII characters 32 to 127 (0-9, A-Z, a-z), special characters, and FNC 1-4
  • 128C (Code Set C) - 00-99 (encodes each two digits with one code) and FNC1
Code 128 Winforms Generator supports above code sets and adds auto code set that automatically select code set for specified data. Please select Code128_A,Code128_B, Code128_C, or Code128 for symbol for code set selection.
Code 128 in Winforms Control Library - Barcode Scaling Support
Module Bar Size
The width of module bar is managed by BarWidth; the height of bar is controlled by BarHeight.
Margins Width
Increasing the width of margins around the symbol is one way to enhance the readability of the Code 128 barcode image. The control library set the left, right, top, and bottom margins separately with float values.
Image Size
If the breakdown parameters are not provided, you can set the width and height of the barcode image directly. Once you enabled the image resize function, you only need to provide the size of entire barcode image. This intelligent Code 128 will draw the barcode with reasonable parameters. The generated Code 128 is 100% compatible with ISO / IEC 15417 (2nd edition 2007-06-01).
Code 128 in Winforms Control Library - Image Setting Support
Image Formats
With Terrek Barcode Winforms Control DLL, Code 128 is created as high quality GIF, JPEG, or PNG graphic images. Tiff and Bitmap are supported as well. Please ensure the accordance of image format and suffix of image file name.
Image Resolution
DPI (Dots per inch) is used commonly as the measure of printing resolution. The resolution of image generated by Code 128 generator could be managed with DPI.
Image Rotation
In case of any specified requirement of the image orientation, image rotation function is added to the control library. Rotation angles of 90, 180, and 270 degrees are supported.
Code 128 in Winforms Control Library - Solution Projects Support
Code 128 Barcode Winforms Control could also be added into other types of .NET projects. The following are supported:
  • Console Application (runtime support)
  • Windows Forms Application (design-time and runtime support)
  • Class Library (runtime support)
  • Windows Service (runtime support)