Code 39, also named 3 of 9 Code, USD-3, Alpha39, Code 3/9, Type 39 & USS Code39, is a self-checking linear barcode symbology specified in ISO/IEC symbology specification to encode alphanumeric data.
Code 39 standard mode supports the following characters encoding
- Alphanumeric data: 0-9, A-Z
- Special characters: space $ % + - . /
- Start/stop character: *
To generate Code 39 with standard mode in vb.net, you need choose property "Symbology" as
KeepAutomation.Barcode.Symbology.Code39
Code 39 full ASCII mode encodes:
- Code 39 supports encoding the full 128 character ASCII character set in accordance with ISO 646 IRV.
To generate Code 39 with full ASCII mode in vb.net, you need choose property "Symbology" as
KeepAutomation.Barcode.Symbology.Code39ex
Code 39 start/stop characters in vb.net
Code 39 uses asterisk character (*) as Start and Stop characters, and it should not be part of the Code 39 barcode data.
In the barcode Human-readable interpretation, it can display or hide start/stop characters (asterisk *).
In Visual Basic .NET project, you can easily set to display or hide start/stop characters (*) in generated Code 39 barcode text.
Set property DisplayStartStop to show or hide start, stop chars in vb.net class.
Code 39 symbol check digit in VB.NET
Code 39 does not include a checksum or check digit by default.
For applications requiring enhanced data security, the modulo 43 (MOD43) check character may be used as a check digit.
To enable Code 39 check sum digit, you could apply the property ChecksumEnabled to true in VB.NET class.
If the Code 39 check sum digit is enabled, by default the check digit will be displayed in the printed Code 39 barcode text.
To hide it, in your VB.NET code, you can apply the property DisplayChecksum to false. It will not display the check character in the Code 39 barcode text.
Code 39 Barcode Generation in ASP.NET Using VB
Code 39 Barcode Generation in .NET WinForms Using VB
Code 39 Barcode Generation in Crystal Reports Using VB
Code 39 Barcode Generation in RDLC Reports Using VB
As a professional barcode SDK, this VB.NET barcode creator enables users to create Code 39 barcode images in RDLC Reports easily. A
VB barcode generation guide in RDLC Reports is also provided online to assist in quick barcode generation.
Code 39 Barcode Generation Using VB.NET Demo Code
After you download the trial version of this VB.NET barcode generator SDK and add reference to your barcode project, you may copy the following VB sample code to generate Code 39 barcode image. You can also customize the generated barcode image by resetting
Code 39 parameters.
VB Sample code
Dim code39 As KeepAutomation.Barcode.Bean.BarCode = New KeepAutomation.Barcode.Bean.BarCode
code39.Symbology = KeepAutomation.Barcode.Symbology.Code39
code39.CodeToEncode = "3939"
'Apply checksum for Code 39 barcode.
code39.ChecksumEnabled = True
'Display checksum in the Code 39 barcode text
code39.DisplayChecksum = True
'Unit of measure, Pixel, Cm and Inch supported.
code39.BarcodeUnit = KeepAutomation.Barcode.BarcodeUnit.Pixel
'Code 39 image resolution in DPI.
code39.DPI = 72
'Set generated Code 39 image size
'Code 39 bar module width (X dimention)
code39.X = 1
code39.Y = 60
'Code 39 wide bar width vs narrow bar width. Valid from 2.0f to 3.0f.
code39.WideNarrowRatio = 2.0F
'Space between character symbol, a multiple of X.
code39.I = 1.0F
'Image left margin size, a 10X automatically added according to specification.
code39.LeftMargin = 0
'Image right margin size, a 10X automatically added according to specification.
code39.RightMargin = 0
'Code 39 image top margin size'
code39.TopMargin = 0
'Code 39 image bottom margin size'
code39.BottomMargin = 0
'Orientation, 90, 180, 270 degrees supported' Code 39 image bottom margin size
code39.Orientation = KeepAutomation.Barcode.Orientation.Degree0
'Code 39 image formats in Png, Gif, Jpeg/Jpg, Tiff, Bmp, etc.
code39.ImageFormat = System.Drawing.Imaging.ImageFormat.Gif
'Set Code 39 human readable text style
code39.DisplayText = True
code39.TextFont = New Drawing.Font("Arial", 10.0F, Drawing.FontStyle.Regular)
'Space between barcode and text
code39.TextMargin = 6
'Print Code 39 Start & Stop character * in the barcode text
code39.DisplayStartStop = True
code39.generateBarcodeToImageFile("C://code39-vb-net.gif")