Our Customers
Contact Us Email: support@barcodelib.com
Home > .NET Barcode > VB.NET Barcode Generation Guide > VB.NET QR-Code Generator for .NET WinForms, ASP.NET
Download Barcode for .NET Suite Trial

VB.NET QR Code Barcode Generator Library

How to Create QR-Code Barcodes in .NET applications with Visual Basic/VB.NET
  • Mature VB.NET Barcode Generator component for high-quality QR Code barcode generation
  • Developed completely in Visual C#, with full integration into .NET Framework
  • Create QR Code images in ASP.NET web application and windows application using VB.NET
  • Print, embed QR Codes in Crystal Reports, SSRS Reporting Services and RDLC Local Reports
  • QR-Code barcodes generated are readable & compatible with the latest specification
  • Multiple QR Code barcode settings are adjustable with simple VB.NET programming
  • Simple to control QR Code image size and shape via Properties Window in VB.NET project
  • Offer cost-effective developer license for commercial application development
VB.NET 2D QR Code Barcode Introduction
QR-Code, also known as Quick Response Code, Denso Barcode, QRCode, JIS X 0510, ISO/IEC 18004, is a matrix (two-dimensional symbol) symbology initially designed by Denso Wave for the automotive industry. And now it is widely used in various industries for its fast readability and data capacity.
Compatibility: Barcode for .NET component SDK is compatible with ISO/IEC 18004 (Second Edition 2006-09-01) bar code symbology specification.
Encoding: QR-Code bar code can encode multiple types of data, including numeric and alphanumeric characters (A-Z, a-z, 0-9), Kanji characters (JIS X 0510), and byte data (default is ISO/IEC 8859-1, including characters from English, German, French, Italian, Spanish, Portuguese, Dutch, Afrikaans, etc.)
To get more information on QR Code bar code, please refer to .NET QR-Code Introduction
How to Generate QR Code 2D Bar Code Using VB.NET Class

How to Install

  1. Add barcode dll component to your VB.NET project reference.
    • Click "Project" and select "Add Reference...".
    • Click "Browse" to find Barcodelib.Barcode.ASP.NET.dll or BarcodeLib.Barcode.WinForms.dll in the unzipped file, and click "OK" button.
  2. Add BarcodeLib barcoding dlls to Visual Studio Toolbox.
    • Right click in Toolbox and select "Choose Items...".
    • In the pop-up "Choose Toolbox items" window, click "Browse..." to select either BarcodeLib.Barcode.WinFroms.dll or Barcodelib.Barcode.ASP.NET.dll.
    • Click "OK" and now four items are listed in VS Toolbox, for example: QRCodeWinForm, DataMatrixWinForm, LinearWinForm, and PDF417WinForm.

How to Implement

When installation is done, you can copy the VB.NET demo code below to create a QR Code barcode image in Class Library.
     Imports BarcodeLib.Barcode

Dim qrbarcode As BarcodeLib.Barcode.QRCode
qrbarcode = New BarcodeLib.Barcode.QRCode()
qrbarcode.Data = "123456789"

qrbarcode.ModuleSize = 3
qrbarcode.LeftMargin = 12
qrbarcode.RightMargin = 12
qrbarcode.TopMargin = 12
qrbarcode.BottomMargin = 12
qrbarcode.Encoding = BarcodeLib.Barcode.QRCodeEncoding.Auto
qrbarcode.ImageFormat = System.Drawing.Imaging.ImageFormat.Png

' Set QR Code version (symbol size), available from V1 - V40
qrbarcode.Version = BarcodeLib.Barcode.QRCodeVersion.V1

' Set QR Code Error Correction Level with different recovery ratio, ranging from L(7%), M(15%), Q(25%), H(30%)
qrbarcode.ECL = BarcodeLib.Barcode.QRCodeErrorCorrectionLevel.L

' More QR Code barcode settings here, such as ECI, Stuctured Append, image color, rotation, etc

' Save QR Code barcode image into your system

' Generate barcode & output to byte array
byte[] barcodeInBytes = qrbarcode.drawBarcodeAsBytes()

' Generate barcode to Graphics object
Graphics graphics = ...

' Generate barcode and output to HttpResponse object
HttpResponse response = ...

' Generate barcode and output to Stream object
Stream stream = ...
Above QR code sample code is written in Visual Basic
How to Create QR-Code Bar Codes in VB.NET ASP.NET Web Applications?
BarcodeLib.com QR Code VB.NET generator supports streaming QR Code barcode images in ASP.NET web in two ways.
  1. VB.NET QR Code barcode generation through BarcodeLib Buildin ASP.NET Barcode Application.
    • Unzip the downloaded evaluation package, and copy barcode folder and its contents to your IIS folder, eg. C:\inetpub.
    • Create a new virtual directory in your IIS, name it "barcode", and connect it to the above "barcode" folder in inetpub.
    • Restart IIS for a QR Code streaming test. Simply navigate to:

      Above is the generated QR Code barcode image. If you need to adjust other QR Code dimensions, please view more web stream URL parameters for QR Code here: .NET QR-Code Generator Property Settings.
    • You can also insert this QR Code image in your aspx or html page, simply pass the url to IMG tag or src value.
      For example:
      <img src=http://YourDomain:port/barcode/qrcode.aspx?Data=12345678&LeftMargin=12&RightMargin=12&TopMargin=12&BottomMargin=12 />
      This method will not generate any barcode images in your IIS server side.
  2. VB.NET QR Code barcodes encoding through ASP.NET Web Form Controller.
    • Intall ASP.NET barcode controller to your barcoding project by adding reference.
    • Add barcode library to your Visual Studio toolbox.
    • Open barcode in your unzipped trial package, and copy files "qrcode.aspx", "qrcode.aspx.cs" to the aspx page where you will be generating QR Code images.
    • Now you can drag QRCodeASPNET to your ASP.NET web site, and change QR code settings through properties window on the right.

    • Run the project and a QR Code barcode is generated on your aspx pages.
    • Or you may directly generate QR Code barcodes using above Free demo VB.NET code for your ASP.NET applications.
How to Draw QR-Code Images in VB.NET Windows Applications?
  1. Add reference to BarcodeLib.Barcode.WinForms.dll to your barcoding project.
  2. BarcodeLib.Barcode.WinForms.dll to your Visual Studio toolbox.
  3. You can simply drag the QRCodeWinForm to your windows form, and a QR Code barcode is generated.
  4. Or you may directly create QR Code barcodes using above Free demo VB.NET code for your .NET Windows Forms applications.
VB.NET Barcode Generator Component Supporting Symbologies
VB.NET Linear Barcodes:
VB.NET Matrix Barcodes:
VB.NET Barcode Component Generates 1D (Linear) Barcodes: Codabar, Code 11, Code 2 of 5, Code 39, Code 93, Code 128, EAN 8, EAN 13, EAN 128, Interleaved 2 of 5, ITF14 (UPC Shipping Container Symbol), MSI Plessey, OneCode, Planet, Postnet, RM4SCC (British Royal Mail 4-State Customer Barcode), UPC-A, UPC-E.
VB.NET Barcode Component Generates 2D (Matrix) Barcodes: Data Matrix, PDF417, QR Code.