KA.Barcode for .NET WinForms
How to Generate Code 39 Image in .NET WinForms
Source code to generate, print Code 39 in different image formats using Barcode for .NET WinForms
  • Reliable and mature Code 39 WinForms generator SDK library
  • Dynamically draw high-quality 1D Code 39 images in C#, VB.NET class library, winforms applications
  • Easy-to-use barcode generator provided, such as barcode Java, barcode .NET WinForms, barcode .NET & Excel barcode
  • Programmatically print and save Code 39 locally in Png, Jpeg/Jpg, Gif, Tiff, Bmp image formats
  • Resolution customizable to allow best barcode image output for all printers
  • Compatible with ISO/IEC 16388 Code 39 bar code specification
  • Implementing dynamic barcodes, like Data Matrix Excel, Codabar VB.NET, Word EAN-13, PDF417 ASP.NET in your projects
  • Support linear Code 39 image rotation in 90, 180, 270 degrees
  • Generating high-quality 1D Code 39 images even with low-resolution printers
Code 39 is also named 3 of 9 Barcode, ASNI/AIM Code 39, USD-3, USS Code 39, Code 3/9, Code 3 of 9, USD-3, Code 39 Extended. By installing KA.Barcode Generator for .NET WinForms, a powerful barcode maker component plugin software, users can easily create, make Code 39 barcodes and adjust, save images in different file formats like Png, Jpeg, Gif, Tiff and Bmp.
This guide tells you how to customize Code 39 image in .NET Winforms applicaitons. More settings are available with user-friendly interface operation:
Installation of Code 39 Barcode Maker into .NET Windows Forms
  1. 1.
  2. 2.
    Add reference: Add "KeepAutomation.Barcode.Windows.dll" to your .NET Winforms project reference.
  3. 3.
    Add to toolbox: To add Code 39 "BarcodeControl" to your .NET Winforms toolbox.
Code 39 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 Code 39
  5. 5.
    Now you can customize the following settings

Code 39 Barcode Unit

Three units of measures are provided for your Code 39 generation, which includes cm, inch and pixel. Default value is pixel. You can customize this parameter by changing the Bar Code Unit.

Code 39 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.

Code 39 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.

Code 39 Image Formats

In case you want to apply Code 39 image in different environments, KA.Barcode Generator for .NET Suite 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.

Code 39 Image Orientation

If you want to rotate a Code 39 bar code image when location is concerned, you can find in the control panel the Orientation parameter and change it into: 0 degree, 90 degrees, 180 degrees, or 270 degrees.
Code 39 Image Setting in C#.NET and VB.NET Class Library
Copy the barcode syntax below to output Code 39 image in WinForms with best quality:
using KeepAutomation.Barcode.Bean;
BarCode code39= new BarCode();
code39.Symbology = KeepAutomation.Barcode.Symbology. Code39;
code39.CodeToEncode = "CODE39";
code39.BarcodeUnit = BarcodeUnit.Pixel;
code39.DPI = 72;
code39.X =2;
code39.LeftMargin = 3;
code39.RightMargin = 3;
code39.TopMargin = 3;
code39.BottomMargin = 3;
code39.Orientation = KeepAutomation.Barcode.Orientation .Degree90
code39.ImageFormat = System.Drawing.Imaging.ImageFormat.Png;
Dim code39 As KeepAutomation.Barcode.Bean.BarCode = New KeepAutomation.Barcode.Bean.BarCode

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