KA.Barcode Generator for .NET Suite
How to Create & Resize Code 39 in VB.NET
Complete VB.NET source code to generate, print Code 39 images using Barcode Generator for .NET Control
  • Directly print, draw linear Code 39 bar code with mature KA.Barcode Generator for .NET Suite
  • Support to print 2D barcode in ASP.NET as well, including .NET WinForms ISBN, Intelligent Mail .NET, UPC-E Java
  • Generating, creating Code 39 images in ASP.NET website, Windows Forms, VB.NET class & console applications
  • Compatible with Code 39 barcode specification - ISO / IEC 16388 (2nd edition 2007-05-15)
  • Drawing, creating Code 39, Code 39 Extension barcodes and customize image width and bar height
  • Present property WideNarrowRatio to set the width of the wide bar in Code 39 & Code 39 Extension barcodes
  • Other barcode solutions provided - ASP.NET barcode, barcode .NET, .NET WinForms barcode, etc.
  • Simply to draw & specify inter-characters space with using property I in Code 39 & Code 39 Extension barcodes
  • Easy to append "*" before and after the data in 1D Code 39 & Code 39 Extension barcodes
Code 39 barcode creator control is a best easy-to-use barcode component dll API for VB.NET, which is easily to be integrated into VB.NET projects. This powerful barcode creator control SDK allows developers to add barcoding feature in .NET with simple Code 39 generation. The page explains how to set Code 39 size in VB.NET programming and MS IIS. For Code 39 data and image setting, please see the tutorials below:
Code 39 Barcode Structure
Code 39

Code 39 barcode (a.k.a USD-3, USS Code 39, Code 3/9, Code 3 of 9) is constructed of:
  • Left Quiet Zone
  • A start character - the asterisk (*) character
  • Message data
  • An optional checksum digit calculated on Modulo 43
  • A stop character - the asterisk (*) character
  • Right Quiet Zone
Code 39 Size Setting in KA.Barcode Generator for .NET Suite

Installation for Code 39 Size Setting with VB.NET Class

  1. 1.
  2. 2.
    Copy KeepAutomation.Barcode.Windows.dll or KeepAutomation.Barcode.Web.dll to your VB.NET project folder
  3. 3.
    Open Microsoft Visual Studio, choose "Add Reference" in "Project"
  4. 4.
    Browse KeepAutomation.Barcode.Windows.dll or KeepAutomation.Barcode.Web.dll
  5. 5.
    Now you will see "KeepAutomation.Barcode.Web" or "KeepAutomation.Barcode.Windows" under your references
Copy those following VB.NET Code 39 barcoding & drawing program onto you forms:
Dim barcode As KeepAutomation.Barcode.Bean.BarCode = New KeepAutomation.Barcode.Bean.BarCode
barcode.Symbology= KeepAutomation.Barcode.Symbology.Code39
barcode.CodeToEncode = "Code 39"
barcode.generateBarcodeToImageFile("C://barcode-code39-vbnet.gif")

VB.NET Sample Code for Code 39 Barcode Unit - Pixel, Inch & Cm

BarcodeUnit (URL: barcode-unit; Default: Pixel): it is the unit measurement for all size related settings in Code 39 & Code 39 Extension barcodes. User may change it with "Pixel", "Inch" and "Cm". Replace sample code with following one:
barcode.BarcodeUnit = KeepAutomation.Barcode.BarcodeUnit.Pixel

VB Demo Code to Set Code 39 Barcode I Property

I (URL: i; Default: 1): it is the width of inter-character gap in Code 39 & Code 39 Extension barcodes. Replace sample code with following one:
barcode.I = 3

Set Code 39 Barcode with Wide to Narrow Ratio Property

WideNarrowRatio(URL: wide-narrow-ratio; Default: 2.0): it is the proportion of wide bar and narrow in Code 39 & Code 39 Extension barcodes. Replace sample code with following one:
barcode.WideNarrowRatio = 2.5f

Set Code 39 with X and Y Property

X (URL: x; Default: 1): it is the width of the narrow bar in Code 39 & Code 39 Extension barcodes

Y (URL: y; Default: 50): it is the height of bars in Code 39 & Code 39 Extension barcodes.

Replace sample code with following one:
barcode.X = 3
barcode.Y = 75

Generate Code 39 with Fixed BarCodeWidth and BarCodeHeight

BarCodeWidth (URL: barcode-width; Default: 0): it is the barcode width of Code 39 & Code 39 Extension barcodes.

BarCodeHeight (URL: barcode-height; Default: 0): it is the barcode height of Code 39 & Code 39 Extension barcodes.

Replace sample code with following one:
barcode.BarCodeWidth = 200
barcode.BarCodeHeight = 75

Set Code 39 with Quite Margin Property

TopMargin (URL: top-margin; Default: 0): it is the barcode image top margin in Code 39 & Code 39 Extension barcodes.

BottomMargin (URL: bottom-margin; Default: 0): it is the barcode image bottom margin in Code 39 & Code 39 Extension barcodes.

LeftMargin (URL: left-margin; Default: 0): it is the barcode image left margin in Code 39 & Code 39 Extension barcodes.

RightMargin (URL: right-margin; Default: 0): it is the barcode image right margin in Code 39 & Code 39 Extension barcodes.

Replace sample code with following one:
barcode.TopMargin = 8
barcode.BottomMargin = 8
barcode.LeftMargin = 6
barcode.RightMargin = 6