BizCode Barcode Generator for .NET Ultimate
The most robust & powerful barcode generating SDK for Microsoft .NET Framework
Quick Overviews
  • Powerful barcode creating DLL
  • Completely run in VB.NET
  • 100% sample code provided
  • Multiple barcode formats
  • Full controls provided
How to Generate Code 128 images in VB.NET
VB.NET Code 128 Generator enables users to create, print Code 128 barcodes in VB.NET Windows Forms, VB.NET web forms VB.NET Crystal Reports document, VB.NET class & console applications and work perfectly with Microsoft Visual Studio 2005/2008/2010.
High-quality Code 128 barcode can be drawn and printed according to the latest Code 128 barcode specifications without any distortion. Users may fully control every aspect of Code 128 barcode image with a set of advanced options provided. This passage tells how to specify Code 128 barcode image in .NET using Visual Basic.NET class; others, please see:
How to manage Code 128 valid data in .NET using Visual Basic.NET class
Code 128 Image Related Properties

Barcode Margin

Barcode property Margin is provided by Barcode Generator for .NET Ultimate for users to manage the size of quiet margin of top, bottom, right and left surrounding Code 128 barcode symbols.

Barcode Resolution

Image property Resolution is provided by Barcode Generator for .NET Ultimate to users to describe Code 128 barcode resolution in dots per inch.

Barcode Rotation

Image property Rotate is provided by Barcode Generator for .NET Ultimate for users to change the rotated angle of Code 128 barcode into 0, 90, 180 and 270 degrees.

Image Formats

Image property ImageFormat is provided by Barcode Generator for .NET Ultimate for users to draw and save Code 128 barcode into dynamic image file formats, such as Png, Jpeg/Jpg, Gif, Tiff, Bmp, etc.

VB.NET Graphic Objects

Image property DrawBarcode is provided by Barcode Generator for .NET Ultimate for users to output Code 128 barcode into VB.NET Graphics, Stream and Bitmap objects.
Customize Code 128 Barcode Images in VB.NET
Make sure that your have installed those programs before you specify Code 128 image in VB.NET:
Customize Code 128 Barcode Images in .NET Project Using VB.NET Class
Copy those following code onto your VB.NET projects:
Dim barcode As BusinessRefinery.Barcode.Linear = 
New BusinessRefinery.Barcode.Linear()
barcode.Symbology = BusinessRefinery.Barcode.Symbology.CODE128
barcode.Code = "0123456789"

barcode.drawBarcode2ImageFile("c:/code-128-vb-net.gif")
Change Code 128 Resolution in DPI
In Barcode Generator for .NET Ultimate, the default value of Resolution is 72 dpi.

Copy those following code to change your resolution:
barcode.Resolution = 104
Adjust Code 128 Barcode Quiet Margin
In Barcode Generator for .NET Ultimate, the default value of BottomMargin, TopMargin , LeftMargin and RightMargin are 0 respectively.

Copy those following code to change your quiet margin size:
barcode.BottomMargin = 7
barcode.TopMargin = 7
barcode.LeftMargin = 5
barcode.RightMargin = 5
Change Code 128 Image Rotation
In Barcode Generator for .NET Ultimate, the default value of Rotate is Rotate.Rotate0.

Copy those following code to change your image rotation angle:
barcode.Rotate = Rotate.Rotate180
Show Code 128 Barcode Human-Readable Text
In Barcode Generator for .NET Ultimate, the default value of DisplayText is true.

In Barcode Generator for .NET Ultimate, the default value of TextFont is new Font("Arial", Font.PLAIN, 11).

In Barcode Generator for .NET Ultimate, the default value of TextMargin is 6 pixel.

Copy those following code to change your human-readable text:
barcode.DisplayText = true
barcode.TextFont = new Font("Arial", 11.0f, FontStyle.Bold)
barcode.TextMargin = 10
Save Code 128 in Multiple Image Formats
In Barcode Generator for .NET Ultimate, the default value of is gif. Copy those following code to change your image format:
barcode.Format = ImageFormat.Png;
barcode.drawBarcode2ImageFile("c:/ean-128-csharp.Png")
Users may change image format into gif, png, tiff, jpeg, png; or save it as VB.NET graphic objects:
Public Sub drawBarcode2Stream(ByVal fileStream As System.IO.Stream)
Public Sub drawBarcodeOnGraphics(ByVal graphics As
System.Drawing.Graphics)
Public Function drawBarcodeAsBytes() As Byte()
Public Function drawBarcodeOnBitmap() As System.Drawing.Bitmap