VB.NET Code 128 Generator Library SDK
Integration & Developer Guide of Code 128 Barcode Generation in VB.NET

Generate barcode Code 128 images in Visual Basic .NET with complete sample VB.NET source code

  • Generate, create Code 128 in Visual Basic .NET applications
  • Easy to install & integrate barcode Code 128 with Code 128 check digit generation library SDK into VB.NET developments
  • Generate over 30 linear, 2d barcode images in VB.NET including VB.NET QR Code, VB.NET Data Matrix, VB.NET EAN-128, VB.NET Code 39
  • Generate Code 128 images in VB.NET class library
  • Create barcode Code 128 in VB.NET ASP.NET web application, webform, webpage
  • Print Code 128 barcode in VB.NET Windows Form project
  • Draw Code 128 in SQL Server Reporting Services (SSRS) & Crystal Reports for .NET projects
  • Easy to encode Code 128 images to jpeg, gif, png, tiff, bitmap files in VB.NET program

How to create, print Code 128 barcode in VB.NET Windows Forms, WPF application?

  1. Download VB.NET Code 128 Barcode Generator library
  2. Install Visual Basic library to generate Code 128 barcodes in VB.NET Windows Projects
  3. Step by Step Tutorial






VB.NET Code 128 Generator Introduction

Top
Code 128, also known as ANSI/AIM 128, ANSI/AIM Code 128, USS Code 128, Uniform Symbology Specification Code 128, is a very capable linear barcode of excellent density, high reliability.
Using VB.NET Code 128 Generator to create Code 128 barcodes in VB.NET program is a simple and easy job.VB.NET Code 128 Generator control is easy to install with a single .NET Barcode generation control. It is easy to generate Code 128 barcodes in VB.NET class with detailed VB.NET Code 128 settings document and complete demo for Code 128 generation in VB.NET provided in this article.

Code 128 Generators

OnBarcode provides several Code 128 Generator components and software, including Code 128 Generator for C#, Code 128 Generator, Code 128 Generator for .NET, Code 128 Generator for Java, Code 128 Generator for ASP.NET.




How to create, print Code 128 barcode in VB.NET?

Top
Here we will generate a Code 128 linear (1D) barcode, a high-density alphanumeric symbology, for Windows Forms and WPF desktop applications.

The vb.net example below initializes a linear barcode generator, sets the barcode type to Code 128, assigns the encoding data, and exports the finished barcode as a PNG image file.

Dim barcode = New Linear()
barcode.Type = BarcodeType.CODE128
barcode.Data = "Code 128"
barcode.drawBarcode("C://Output//vb-net-code128-how-to-create.png")





How to create, customize Code 128 barcode with specified dimension size in VB.NET?

Top
The following vb.net code demonstrates how to print a custom-sized Code 128 linear (1D) barcode for Windows Forms and WPF desktop applications.

Apply the fixed width and height dimensions in pixels using property BarcodeWidth and BarcodeHeight.

Dim barcode = New Linear()
barcode.Type = BarcodeType.CODE128
barcode.Data = "Code 128"
barcode.BarcodeWidth = 300
barcode.BarcodeHeight = 200
barcode.drawBarcode("C://Output//vb-net-code128-size.png")

Remove Code 128 minimum quiet zones

The following VB.NET code snippet generates a Code 128 linear (1D) barcode without mandatory quiet zones for VB.NET Windows Forms and WPF desktop applications.

  • Disables the automatic minimum quiet zone (blank margin) around the Code 128 barcode in the rendering process. This setting removes the standard blank border required by symbology specifications.

Note: Disabling quiet zones may cause Code 128 barcodes scanning failures in production environments. Quiet zones are required by Code 128 barcode standards.


Dim barcode = New Linear()
barcode.Type = BarcodeType.CODE128
barcode.Data = "Code 128"
barcode.BarcodeWidth = 300
barcode.BarcodeHeight = 200
barcode.IsMinQuietZoneApplied = False
barcode.drawBarcode("C://Output//vb-net-code128-size-no-quiet-zone.png")







How to print, customize Code 128 barcode in VB.NET?

Top

Customize Code 128 printed text label

Here we will explain how to generate and print a Code 128 linear (1D) barcode with fully customized human-readable text using VB.NET.

The following VB.NET source code will configure Code 128 barcode text margin and font style, then exports the styled Code 128 barcode as a PNG image file.

  • Use propery TextMargin to set a vertical margin of 30 pixels between the Code 128 barcode bars and the human-readable text below it.
  • Use propery TextFont to create and assign a custom OCR-B font with size 18 and bold style for the barcode's human-readable text.

    OCR-B is the GS1 industry-standard recommended font for barcode text, ensuring optimal readability in VBs.NET desktop applications.

Dim barcode = New Linear()
barcode.Type = BarcodeType.CODE128
barcode.Data = "Code 128"
barcode.TextMargin = 30
barcode.TextFont = New Font("ocr-b", 18, FontStyle.Bold)
barcode.drawBarcode("C://Output//vb-net-code128-text.png")



Hide Code 128 barcode text label

Set property ShowText to false to hide Code 128 barcode text label in the image.

barcode.ShowText = False





Customize Code 128 barcode colors in VB.NET

Here we will generate a customized Code 128 barcode with custom foreground, background, and text colors for Windows Forms and WPF desktop applications.

  • Use propery ForeColor to set the foreground color (barcode bars) to red, overriding the default black color for the barcode modules.
  • Use propery BackColor to configure the background color of the entire barcode area to light blue for visual enhancement. The background color fills the whitespace and margins around the Code 128 barcode.
  • Use propery TextColor to define the color of the human-readable text below the barcode as red to match the barcode bars.

Dim barcode = New Linear()
barcode.Type = BarcodeType.CODE128
barcode.Data = "Code 128"
barcode.ForeColor = Color.Red
barcode.BackColor = Color.LightBlue
barcode.TextColor = Color.Red
barcode.drawBarcode("C://Output//vb-net-code128-barcode-color.png")

Colored Code 128 image generated in visual basic class


Colored Code 128 image printed on VB.NET Windows Forms












Common Asked Questions

What is the barcode Code 128 text code?

Code 128 barcode is a high-density 1d barcode symbology, which encodes digits, letters, control characters, and full ASCII 128 characters. Using VB.NET barcode generator library, you can easily encode, create, customize and print Code 128 barcode images in com.onbarcode.barcode.Code128 class in Visual Basic .NET class library, console, WinForms, WPF windows applications.

What is Code 128 barcode used for?

Code 128 barcode is a common linear barcode type used in:
  • Food and non-food industries
  • Shipping and packing industry
  • Health, public sector and government bodies
You can easily create standard Code 128 barcode images in VB.NET Windows application using OnBarcode VB.NET Barcode Generator library.

What is the check digit for code 128?

Code 128 barcode contains a mandatory check digit (checksum) character, which is based on module 103 (mod 103). Using VB.NET barcode library API, the generator software will automatically calculate the check character and insert into the Code 128 barcode in VB.NET projects.

What is Code 128 barcode maximum length?

The Code 128 ISO standard does not define the maximum number of characters in a single Code 128 barcode.

However some Code 128 standards will provide the limits. GS1-128 has limits the maximum length of Code 128 data to 48 characters.

Using VB.NET Barcode library, you will encode and generate ISO standard Code 128 and application approved Code 128 barcodes, such as GS1-128 in Visual Basic .NET class library, console, WinForms, WPF windows applications.

How to scan, read Code 128 barcodes?

You can download and install OnBarcode free Code 128 barcode scanner software, or use barcode scanner device, or 3rd party apps installed on phone to read and scan the Code 128 barcodes. OnBarcode provides VB.NET Barcode Reader library to scan, read Code 128 and other 2d, 1d barcodes in VB.NET application. Also you can use the OnBarcode free Code 128 barcode scanner software to decode Code 128 barcode images.

Is Code 128 barcode better than Code 39?

Both Code 128 and Code 39 are popular linear barcode symbologies. Code 128 is more compact than Code 39, supporting more data to be encoded in a smaller space. VB.NET Barcode library allows VB.NET developers to encoding and printing both Code 128 and Code 39 in Visual Basic .NET class library, console, WinForms, WPF windows applications.




































Terms of Use | Privacy Policy
Copyright © OnBarcode.com . All rights reserved.