VB.NET Barcode Generation Guide & Tutorial

Generate, Create, Draw, Generate, Print Linear & 2D BarCodes in VB.NET applications


  • Generate barcodes in VB.NET Class & console applications
  • Generate barcodes in VB.NET ASP.NET web applications
  • Generate barcodes in VB.NET Windows Forms applications
  • Generate barcodes in Reporting Service & Crystal Reports
  • Completely developed in .NET 2.0
  • Compatible with latest barcode symbology ISO Standards
  • Mature barcode generating components used by 1000+ clients


OnBarcode provides several .NET Barcode Generation Components for generating linear (1D) & matrix (2D) barcodes in Microsoft Visual Basic .NET applications. This article helps VB.NET professionals choose the right barcode generating component for your VB.NET development environment.

Compare THREE .NET Barcode Generator components in different VB.NET development environments

         .NET Barcode for ASP.NET

  • Generate barcodes in VB.NET class

  • Generate barcodes in VB.NET console applications

  • Generate barcodes in VB.NET ASP.NET Web projects

         .NET Barcode for WinForms

  • Generate barcodes in VB.NET class

  • Generate barcodes in VB.NET console applications

  • Generate barcodes in VB.NET Windows Forms projects

         .NET Barcode Suite

  • Generate barcodes in VB.NET class

  • Generate barcodes in VB.NET console applications

  • Generate barcodes in VB.NET Web Forms projects

  • Generate barcodes in VB.NET Windows Forms projects

  • Generate barcodes in VB.NET Reporting Service 2005 & 2008 projects



VB.NET Barcode Generator Quick Start

1. How to install .NET Barcode Generator Control to your Visual Basic .NET project?

Add OnBarcode.Barcode.WinForms.dll or OnBarcode.Barcode.ASPNET.dll to VB.NET project reference

2. How to generate linear barcodes in VB.NET class?

Dim barcode As OnBarcode.Barcode.Linear
barcode = New OnBarcode.Barcode.Linear()      // Create linear barcode object
barcode.Type = BarcodeType.CODE39	      // Set barcode symbology type to Code-39
barcode.Data = "0123456789"                   // Set barcode data to encode
barcode.X = 1                                 // Set barcode bar width (X dimension) in pixel
barcode.Y = 60                                // Set barcode bar height (Y dimension) in pixel
barcode.drawBarcode("vbnet-code39.png")       // Draw & print generated barcode to png image file

Barcode Code-39

3. How to draw & print QR-Code in VB.NET class?

Dim qrCode As QRCode
qrCode = New QRCode()                        // Create QRCode object
qrCode.Data = "VB.NET QRCode"                // Set QR Code data to encode
qrCode.DataMode = QRCodeDataMode.Auto        // Set QRCode data mode (QR-Code Barcode Settings)
qrCode.drawBarcode("vbnet-qrcode.jpg")       // Draw & print generated QR Code to jpeg image file

4. How to create & print Data Matrix in VB.NET class?

Dim datamatrix As DataMatrix
datamatrix = New DataMatrix()                        // Create Data Matrix object
datamatrix.Data = "VB.NET DataMatrix"                // Set Data Matrix data to encode
datamatrix.DataMode = DataMatrixDataMode.ASCII       // Set Data Matrix data mode (Data Matrix Barcode Settings)
datamatrix.drawBarcode("vbnet-data-matrix.gif")      // Draw & print generated Data Matrix to gif image file

5. How to create & print PDF-417 in VB.NET class?

Dim pdf417 As PDF417
pdf417 = New PDF417()                       // Create PDF-417 object
pdf417.Data = "VB.NET PDF-417"              // Set Data Matrix data to encode
pdf417.DataMode = PDF417DataMode.Auto       // Set PDF-417 data mode (PDF-417 Barcode Settings)
pdf417.RowCount = 3                         // Set PDF-417 number of rows
pdf417.ColumnCount = 5                      // Set PDF-417 number of columns
pdf417.drawBarcode("vbnet-pdf417.gif")      // Draw & print generated Data Matrix to gif image file

6. In VB.NET Barcode Generator, how to print & encode barcodes to GIF, JPEG, PNG & BMP?

Dim barcode As OnBarcode.Barcode.Linear
barcode = New OnBarcode.Barcode.Linear()
barcode.Type = OnBarcode.Barcode.BarcodeType.CODE39
barcode.Data = "0123456789"

// Encode barcodes to other image format, by change file extension
barcode.drawBarcode("C://vbnet-barcode-code39.gif")


VB.NET Barcode Generator Supporting Barcode Symbology Types


(Click to view each barcode type property settings)







Barcode Generation Guide for .NET / Java Developers

.NET Barcode Generation     |     C# Barcode Generation     |     ASP.NET Barcode Generation     |     VB.NET Barcode Generation

Java Barcode Generation