UPC-A FAQ in VB.NET Barcode Generator SDK

Draw & Print UPC-A and adjust UPC-A data, image, size, and other properties with VB source code available
Barcode in VB.NET > Linear > UPC-A FAQ
Generate Barcode Image Using Visual Basic.NET Class - UPC-A Barcode FAQ in VB.NET
UPC-A Barcode Generator Component DLL for VB.NET is a professional and desirable .NET control SDK exclusively designed for .NET developers to generate, draw, print and encode barcode images into VB.NET projects with high readability and clear images. VB.NET sample and source code is provided for easy and quick UPC-A and other 40+ linear & 2D barcode generation.
This page gives detail view of UPC-A, UPC-A+2, UPC-A+5 barcode property settings under Visual Basic.NET projects on the following aspects:
  • Generate Barcode Image Using Visual Basic.NET Class - UPC-A Data Encoding
  • Generate Barcode Image Using Visual Basic.NET Class - UPC-A Special Settings
  • Generate Barcode Image Using Visual Basic.NET Class - UPC-A Size Adjustment
  • Generate Barcode Image Using Visual Basic.NET Class - UPC-A Image Customization
  • Generate Barcode Image Using Visual Basic.NET Class - UPC-A Solution Project Support
Generate Barcode Image Using Visual Basic.NET Class - UPC-A Data Encoding
Linear UPC-A Barcode Valid Data in Barcode Library SDK
  • Digit numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
  • 11 digits long with a checksum character which is automatically calculated by Terrek.Barcode for VB.NET
UPC-A VB.NET Sample Code:
UPCA.Symbol = Terrek.Barcode.BarcodeSymbol.UPCA
UPCA.BarcodeData = "56423156456"
UPC-A Human-Readable Text
Human-readable text is flexible to be enabled or disabled with barcode control SDK for VB.NET. Developers may set this property via DisplayData. Type is bool.The default is true.
Once enabled text in barcode image, the text font is adjustable. The font used to display text in barcode image. Type is TextStyle, default is New Font("Arial", 9.0F, FontStyle.Regular). The color & space of text font are adjustable.
UPC-A VB.NET Sample Code:
UPCA.DisplayData = True
UPCA.TextStyle = New Font("Arial", 9.0F, FontStyle.Regular)
UPCA.TextColor = Color.Red
UPCA.TextSpace = 7
Generate Barcode Image Using Visual Basic.NET Class - UPC-A Special Settings
UPC-A Supplemental Barcode
UPC-A barcode SDK allows users to add 2 or 5 digits supplemental data to the UPC-A barcode. Once encode the UPC-A add-on barcodes, the size related properties needs to be set. Users may add supplemental digits using Symbology property and customize add-on barcode size by adjusting SupplementCode, SupplementHeight, SupplementSpace respectively.
UPC-A+2 VB.NET Sample Code:
UPCA.Symbol = Terrek.Barcode.BarcodeSymbol.UPCA_AddOn2
UPCA.AddOnData = "23"
UPCA.AddOnHeight = 0.8
UPCA.AddOnMargin =7
UPC-A+5 VB.NET Sample Code:
UPCA.Symbol = Terrek.Barcode.BarcodeSymbol.UPCA_AddOn5
UPCA.AddOnData = "23123"
UPCA.AddOnHeight = 0.85
UPCA.AddOnMargin =10
Generate Barcode Image Using Visual Basic.NET Class - UPC-A Size Adjustment
UPC-A UOM (Unit of Measure)
Set property MeasuringUnit for properties BarWidth, BarHeight, MarginL and MarginT. Valid values are PIXEL, CM and INCH. Default is PIXEL. With this UOM setting, users can control the whole barcode size to a unique type.
UPC-A VB.NET Sample Code:
UPCA.MeasuringUnit = Terrek.Barcode.MeasuringUnit.PIXEL
UPCA Module Size
UPCA bar size refers to the BarWidth and BarHeight of a module bar. When developers need to encode barcodes with a fixed bar width, these two properties need to be implemented. With the ImageResize applied, image width & image height are changed according to the adjustment of bar width and bar height. The type is float.
UPCA VB.NET Sample Code:
UPCA.BarWidth = 2
UPCA.BarHeight = 60
UPC-A Image Size
UPC-A image size refers to the whole barcode image size including image width and image height. If the module size is unknown, you can set the ImageHeight and ImageWidth directly with the applying of ImageResize to true. The generated UPC-A is 100% compatible with International Standard ISO/IEC 15420.
UPC-A VB.NET Sample Code:
UPCA.ImageWidth = 80
UPCA.ImageHeight = 80
UPC-A Margin Size
Increasing the width of margins around the symbol is one way to enhance the readability of the UPC-A barcode image. The barcode generator library SDK set the left, right, top, and bottom margins separately with float values. The default value is 0.
UPC-A VB.NET Sample Code:
UPCA.MarginL = 2
UPCA.MarginR = 2
UPCA.MarginT = 2
UPCA.MarginB = 2
Generate Barcode Image Using Visual Basic.NET Class - UPC-A Image Customization
UPC-A Image Format
The UPC-A barcode image generated in VB.NET can be displayed as Gif, Tiff, Bmp, Png, Jpeg and other image formats. Programmers may change the format using BarcodeFormat property.
UPC-A VB.NET Sample Code:
UPCA.BarcodeFormat = System.Drawing.Imaging.ImageFormat.Tiff
UPCA.SaveAsImage("C:\upca.tiff")
UPC-A Image Resolution
DPI (Dots per inch) is used commonly as the measure of printing resolution. The resolution of image generated by UPC-A library generator SDK could be managed with DPI and compatible with all printers. Type is int. Default is 96 dpi. Programmers can set resolution with DotsPerInch property.
UPC-A VB.NET Sample Code:
UPCA.DotsPerInch = 96
UPC-A Image Position
The created UPC-A is flexible to change the placement in VB.NET projects with source. By customizing the BarAlign properly, the image is presented left, right or center in documents or projects. By changing Rotation property, the image can be rotated to 90, 180, and 270 degrees. The default is 0 degree.
UPC-A VB.NET Sample Code:
UPCA.Rotation = Terrek.Barcode.Rotation.Degree0
UPCA.BarAlign = Terrek.Barcode.BarAlign.Center
UPC-A Image Color
It is able to change barcode colors with barcode library software DLL using VB.NET class. Both background color and foreground color are easy to be changed by manipulating ImageColor and BarColor respectively.
UPC-A VB.NET Sample Code:
UPCA.ImageColor = Color.Wheat
UPCA.BarColor = Color.BlueViolet
Generate Barcode Image Using Visual Basic.NET Class - Supported Solution Projects
VB.NET barcode library generator DLL is able to implement into multiple VB.NET projects using VB.NET code with source to create dynamic UPC-A barcode as image. These following applications are completely compatible with barcode control DLL using Visual Basic.NET programming. Tutorial to create & print barcode images using VB.NET.
  • Windows Forms Application (design-time and runtime support)
  • Visual Basic Console Application (runtime support)
  • Visual Basic Class Library (runtime support)
  • Windows Service (runtime support)
  • ASP.NET Applications (design-time and runtime support)
  • Web Service (runtime support)
  • Crystal Report for .NET (runtime support)
  • Reporting Service Applications (design-time and runtime support)