Code 39 FAQ in VB.NET Barcode Generator SDK

Generate Code 39 and adjust Code 39 data, image, size, and other properties with VB source code available
Barcode in VB.NET > Linear > Code 39 FAQ
Generate Barcode Image Using VB.NET Class Library - Code 39 Barcode FAQ in VB.NET
Code 39 Barcode Generator Control DLL for VB.NET is a professional and easy-to-use .NET component software for creating Code 39 and other linear & 2D/Matrix barcode images in Visual Basic.NET projects with the providing of sample source code and detail manual tutorial. The barcodes embedded in VB.NET programs are displayed as Gif, Tiff, Bmp, Png or Jpeg formats or saved as Byte Stream, Bitmap or Graphic objects.
This article has detail information of Code 39 property settings in VB.NET projects using Visual Basic.NET source class method including the following aspects:
  • Create Code 39 Barcode Images Using VB.NET Class Library - Code 39 Data Encoding
  • Create Code 39 Barcode Images Using VB.NET Class Library - Code 39 Special Settings
  • Create Code 39 Barcode Images Using VB.NET Class Library - Code 39 Size Adjustment
  • Create Code 39 Barcode Images Using VB.NET Class Library - Code 39 Image Customization
  • Create Code 39 Barcode Images Using VB.NET Class Library - Code 39 Solution Project Support
Create Code 39 Barcode Images Using VB.NET Class Library - Code 39 Data Encoding
Linear Code 39 Barcode Valid Data in Barcode Control DLL
  • Numeric digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
  • Uppercase letters (A - Z)
  • Special characters: - (Dash), $ (Dollar), % (Percentage), (Space), . (Point), / (Slash), + (Plus)
  • Lowercase letters (a - z) for Extended Code 39
Code 39 VB.NET Sample Code:
Code39.Symbol = Terrek.Barcode.BarcodeSymbol.Code39
Code39.BarcodeData = "TRCODE39"
Extended Code 39 VB.NET Sample Code:
Code39.Symbol = Terrek.Barcode.BarcodeSymbol.Code39_Extendsion
Code39.BarcodeData = "Terrek-Code 39"
Code 39 Human-Readable Text
VB.NET Barcode control library is able to enable or disable barcode data in Code 39 symbol. Developers may change this option via DisplayData. Type is bool.The default is true.
The text font of Code 39 is changeable. 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.
Code 39 VB.NET Sample Code:
Code39.DisplayData = True
Code39.TextStyle = New Font("Arial", 9.0F, FontStyle.Regular)
Code39.TextColor = Color.Black
Code39.TextSpace = 6
Create Code 39 Barcode Images Using VB.NET Class Library - Code 39 Special Settings
Code 39 Checksum Character
Code 39 is a kind of self-checking barcode symbology, check digit is optional. Set the AutoCheckSum to true, the Code 39 check digit will be calculated and appended on the symbol with Module 43; set the ShowCheckSum to true, the Code 39 checksum will be showed in human-readable text. Type is bool. Default is false.
Code 39 VB.NET Sample Code:
Code39.AutoCheckSum = True
Code39.ShowCheckSum = True
Code 39 Start and Stop Character Asterisk “*”
Originally, Code 39 barcode is appended by the start and stop character “*”, but with barcode generator component for VB.NET, the asterisk may be removed by setting DisplayAsterisk to false. Defalut is false.
Code 39 VB.NET Sample Code:
Code39.DisplayAsterisk = False
Code 39 Wide Bar to Narrow Bar Ratio
As the name specified, it means the ratio between wide bar and narrow bar, the value ranges from 2.0f to 3.0f. The default is 2.0f, developers may change the value through WideVSNarrow property.
Code 39 VB.NET Sample Code:
Code39.WideVSNarrow = 2.0f
Code 39 Interspace Gap
Code 39 Interspace gap means the ratio between the two neighbor characters; it is the multiple of X. Default is 1.0f.
Code 39 VB.NET Sample Code:
Code39.WideVSNarrow = 2.0f
Create Code 39 Barcode Images Using VB.NET Class Library - Code 39 Special Settings
Code 39 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.
Code 39 VB.NET Sample Code:
Code39.MeasuringUnit = Terrek.Barcode.MeasuringUnit.PIXEL
Code 39 Bar Size
The X and Y dimension size for Code 39. In barcode generator & control library, they are BarWidth and BarHeight. The whole barcode image is changed according to the adjustment of bar width and bar height. The type is float.
Code 39 VB.NET Sample Code:
Code39.BarWidth = 2
Code39.BarHeight = 80
Code 39 Image Size
Code 39 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 Code 39 is 100% compatible with ISO / IEC 16388 (2nd edition 2007-05-15).
Code 39 VB.NET Sample Code:
Code39.ImageWidth = 100
Code39.ImageHeight = 100
Code 39 Margin Size
Increasing the width of margins around the symbol is one way to enhance the readability of the Code 39 barcode image. The barcode control library SDK set the left, right, top, and bottom margins separately with float values. The default value is 0.
Code 39 VB.NET Sample Code:
Code39.MarginL = 4
Code39.MarginR = 4
Code39.MarginT = 4
Code39.MarginB = 4
Create Code 39 Barcode Images Using VB.NET Class Library - Code 39 Image Customization
Code 39 Image Format
Code 39 generated in Visual Basic.NET programs with barcode control software can be displayed as Gif, Tiff, Bmp, Png, Jpeg and other image formats. Programmers may change the format using BarcodeFormat property.
Code 39 VB.NET Sample Code:
Code39.BarcodeFormat = System.Drawing.Imaging.ImageFormat.Png
Code39.SaveAsImage("D:\code39.png")
Code 39 Image Resolution
DPI (Dots per inch) is used commonly as the measure of printing resolution. The resolution of image generated by Code 39 generator SDK could be managed with DPI. Type is int. Default is 96 dpi. Set with DotsPerInch property.
Code 39 VB.NET Sample Code:
Code39.DotsPerInch = 96
Code 39 Image Position
The created Code 39 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.
Code 39 VB.NET Sample Code:
Code39.Rotation = Terrek.Barcode.Rotation.Degree0
Code39.BarAlign = Terrek.Barcode.BarAlign.Center
Code 39 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.
Code 39 VB.NET Sample Code:
Code39.ImageColor = Color.White
Code39.BarColor = Color.Black
Create Code 39 Barcode Images Using VB.NET Class Library - Code 39 Development Environment
Any development environment that compatible with VB.NET programming is able to use this barcode control library SDK to create & print Code 39 images. And the following projects can be adopted to fulfill your barcoding in VB.NET applications. 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)