KA.Barcode for .NET WinForms
How to Generate UPC-A Image in .NET WinForms
Source code to generate UPC-A in different image formats using Barcode for .NET WinForms
  • Integrate UPC-A, UPC-A+2, UPC-A +5 barcode image into applications in .NET Framework
  • Support 1D UPCA generation in Crystal Report, WinForms, C#, VB.NET class lib
  • Generating high quality barcode image that could be read omni-directionally by any scanners
  • Complete user manual Java barcode creation, VB.NET barcode guide & C# barcode generation provided
  • Gif, Tiff, Png, and Bmp image formats are supported for multiple UPC-A 1D barcodes creation
  • Rotate barcode image to define symbol placement properly
  • Produce, string UPC-A in Png, Jpeg/Jpg, Gif, Tiff, Bmp/Bitmap formats and save to local files
  • Automatic checksum digit calculation by component according to algorithm specified in GS1 standard
  • Draw and print barcode ASP.NET, barcode Excel, .NET WinForms barcode & barcode .NET in .NET IDEs
  • Complete source code are provided with purchase of a Source Code License
UPC-A, is also named as Universal Product Code version A, UPC-A+2, UPC-A Supplement 2 (Two-digit Add-On), UPC-A+5, UPC-A Supplement 5 (Five-digit Add-On), UPC Bar Code, UPC Symbol, GTIN-12, GS1-12.
KeepAutomation Barcode Maker for .NET WinForms is a barcode generator device API SDK for you to dynamically insert, make UPC-A, UPC-A+2, UPC-A+5 as well as other linear & bidimensional symbologies in Windows Forms with C#, VB.NET programming. This page is on image setting, and more tutorials are provided below:
Installation of UPC-A Barcode Maker Component into .NET WinForms
  1. 1.
  2. 2.
    Add reference: Add "KeepAutomation.Barcode.Windows.dll" to your .NET Winforms project reference.
  3. 3.
    Add to toolbox: To add BarcodeControl to your .NET WinForms toolbox.
UPC-A Image Setting with Drag & Drop BarcodeControl
  1. 1.
    In "Choose Toolbox Items" form, click button "Browse...", and select KeepAutomation.Barcode.Windows.dll.
  2. 2.
    Now you will see BarCodeControl in your toolbox.
  3. 3.
    Drag and drop the BarCodeControl into the Forms and a Codabar image is generated.
  4. 4.
    Find barcode setting panel in the left side and change barcode symbology into UPC-A.
  5. 5.
    Customize the following UPC-A image setting.

UPC-A Barcode Unit

BarcodeUnit function allows users to select proper measuring unit for UPC-A barcode generation. Three units of measures are provided for your UPC-A generation, which includes cm, inch and pixel. Default value is pixel. You can customize this parameter by changing the Bar Code Unit.

UPCA Image Resolution

KA.Barcode Generator allows you to create and display high quality barcode images in Window Applications. You can adjust Code 39 image resolution through DPI setting for high-quality image generation. Default value is 72 dots per inch.

UPC-A Barcode Margins / Quiet Zones

According to the ISO/IEC 16388 Code 39 specifications, a quiet zone is required on the left and right sides of a Code 39 barcode images, with a minimum value 10X automatically added by KA.Barcode Generator for .NET Winforms.

UPC-A Supplemental Bar Height

If you want to generate an UPC-A barcode with a two-digit or a five-digit add-on symbol, i.e. the UPC-A+2 (UPCASup2), UPC-A+5 (UPCASup5), you might want to adjust the supplemental bar height and supplemental bar space. The supplemental bar height is a float value, with a default value 0.8F, which means the supplemental bar height is 80% the height of the primary bar height.

UPC-A Image Formats

In case you want to apply UPC-A image in different environments, KA.Barcode Generator for .NET WinForms enables you to generate and save Code 39 barcodes in various image formats including Jpg, Gif, Png, Tiff, Bmp and so on. Just find ImageFormat in the property panel and adjust it into the image formats you want.

UPC-A Image Orientation

In case you want to rotate a UPC-A bar code image to change its psition, you can find in the control panel the Orientation parameter and change it into: 0 degree, 90 degrees, 180 degrees, or 270 degrees.
UPC-A Image Setting in C#.NET and VB.NET Class Library
Copy the sample codings below to produce, display a UPC-A in WinForms with numeric string:
using KeepAutomation.Barcode.Bean;
BarCode upca = new BarCode();
upca.Symbology = KeepAutomation.Barcode.Symbology.UPCA;
upca.CodeToEncode = "12345601231";
upca.BarcodeUnit = BarcodeUnit.Pixel;
upca.DPI = 72;
upca.X =2;
upca.LeftMargin = 3;
upca.RightMargin = 3;
upca.TopMargin = 3;
upca.BottomMargin = 3;
upca.Orientation = KeepAutomation.Barcode.Orientation .Degree90
upca.ImageFormat = System.Drawing.Imaging.ImageFormat.Png;
Dim upca As KeepAutomation.Barcode.Bean.BarCode = New KeepAutomation.Barcode.Bean.BarCode

upca.Symbology = KeepAutomation.Barcode.Symbology.UPCA
upca.BarcodeUnit = BarcodeUnit.Pixel
upca.DPI = 72
upca.CodeToEncode = "12345601231"
upca.X = 3
upca.LeftMargin = 3
upca.RightMargin = 3
upca.TopMargin = 3
upca.BottomMargin = 3
upca.Orientation = KeepAutomation.Barcode.Orientation .Degree90
upca.ImageFormat = System.Drawing.Imaging.ImageFormat.Png
upca.generateBarcodeToImageFile("C://upca _vb.png")