KA.Barcode for .NET WinForms
How to Print QR Code in .NET WinForms with Valid Data
Complete QR Code source code to generate QR Code images using Barcode Generator for .NET Control
  • Best .NET barcode generator control for .NET 2.0 and later versions
  • Draw and print barcode Java, Excel barcode, ASP.NET barcode & barcode .NET WinForms in .NET IDEs
  • Compatible with Microsoft Visual Studio 2005/2008/2010
  • Create QR Code matrix bar code images in .NET windows applications
  • Draw QR Code using C# and VB.NET in different data modes like Alphanumeric, Byte, Kanji and Numeric
  • Printing, generating Auto data mode to simplify 2D QR Code data encoding
  • Provide QRCodeECI to encode multiple character sets
  • Embedding dynamic linear & 2D barcodes, such as QR Code Word, .NET WinForms EAN-13, ASP.NET EAN-8, .NET WinForms ITF-14, in your applications
  • Print and save 2D QR Code barcodes locally as gif, jpeg, png, tiff, and bitmap files
  • Compatible with ISO / IEC 18004 (2nd edition) to produce QR Code tag for all scanners
KA.Barcode Generator for .NET WinForms is a reliable barcode component API software which allows you to simply create, string matrix QR Code barcodes in .NET windows forms, Crystal Reports, Visual C#, Visual Basic.NET class library, etc. You can start from this page to encode valid data into QR Code and generate readable images in .NET WinForms.
2D QR Code Introduction
QR Code is a commonly-used two-dimensional barcode symbology also named Denso Barcode, QRCode, Quick Response Code, JIS X0510, ISO/IE18004.

Valid Data

  • Numeric & Alphanumeric data: 0-9, A-Z, a-z and nine special characters: space, & % * + - . / :
  • Kanji characters

Valid Length

  • QR Code barcode has a variable-length.
  • Alphanumeric data: up to 2335 characters (maximum)
  • 8-bit byte data: 1555 characters
  • Numeric data; 3116 digits
QR Code Data Encoding in .NET Windows Forms with C#, VB.NET

Install QR Code Barcode Generator into .NET Projects

  1. 1.
  2. 2.
    Add Reference: Add "KeepAutomation.Barcode.Window.dll" to your .NET WinForms project reference.
  3. 3.
    Add to Toolbox: Add BarCodeControl to your .NET Visual Studio toolbox.
Copy the following demo code onto your project for QR Code image generation & printing:
using KeepAutomation.Barcode.Bean;
BarCode qrcode = new BarCode();
qrcode.Symbology = KeepAutomation.Barcode.Symbology.QRCode;
qrcode.CodeToEncode = "C#qrdemo";
qrcode.X = 3;
qrcode.Y = 3;
Dim qrcode As KeepAutomation.Barcode.Bean.BarCode = New KeepAutomation.Barcode.Bean.BarCode

qrcode.Symbology = KeepAutomation.Barcode.Symbology.QRCode
qrcode.CodeToEncode = "vbqrGenerator"
qrcode.X = 3
qrcode.Y = 3
qrcode.generateBarcodeToImageFile("C://qr _vb.png")
It is so easy to output or retrieve barcodes using vb.net for web application as following steps. Barcode implementation is fast and simple for...
Support to print 2D barcode in ASP.NET as well, including VB.NET QR Code, Codabar VB.NET, .NET WinForms PDF417; ....
QR Code is variable-length, so users are free to encode and make QR Code barcodes at any length using our VB.NET QR Code Barcode Library with...

Printing QR Code with AlphaNumeric Data Mode

If you want to encode digits 0-9, upper-case letters A - Z, and nine other characters: space, & % * + - . / : , you can just select QR Code AlphaNumeric Data Mode. Simply copy the demo code below to transform alphanumeric data into QR Codes.
qrcode.QRCodeDataMode = QRCodeDataMode.AlphaNumeric;
qrcode.CodeToEncode = "QR12%";
qrcode.QRCodeDataMode = KeepAutomation.Barcode.QRCodeDataMode.AlphaNumeric
qrcode.CodeToEncode = "QR12%"

Generating QR Code with Byte Data Mode

Byte Data Mode for QR Code allows you to encode ISO/IEC 8859-1 at default. Follow the sample codings below to convert byte data value into a QR Code image.
qrcode.QRCodeDataMode = QRCodeDataMode.Byte;
qrcode.CodeToEncode = "QRtest12";
qrcode.QRCodeDataMode = KeepAutomation.Barcode.QRCodeDataMode. Byte
qrcode.CodeToEncode = "QRtest12"

Drawing QR Code Kanji Data Mode

Kanji Data Mode for QR Code allows you to encode Kanji characters in accordance with the Shift JIS system based on JIS X 0208. In this data format, each two-byte character value is compacted to a 13-bit binary codeword.
qrcode.QRCodeDataMode = QRCodeDataMode.Kanji;
qrcode.QRCodeDataMode = KeepAutomation.Barcode.QRCodeDataMode. Kanji

Painting QR Code with Numeric Data Mode

QR Code Numeric Data Mode allows you to encode numeric data: digits 0 - 9. Copy the sample barcode syntax below to encode numeric text information into a QR Code.
qrcode.QRCodeDataMode = QRCodeDataMode.Numeric;
qrcode.CodeToEncode = "1234";
qrcode.QRCodeDataMode = KeepAutomation.Barcode.QRCodeDataMode.Numeric
qrcode.CodeToEncode = "1234"
Note: If you are not sure which data mode is proper for your encoding data, you can select QR Code Auto mode, KA.Barcode Generator for .NET Suite will automatically print valid QR Code images according to your input data.
QR Code Data Encoding with Drag & Drop BarcodeControl
  1. 1.
    In "Choose Toolbox Items" form, click button "Browse...", and select KeepAutomation.Barcode.Windows.dll.
  2. 2.
    Now a BarCodeControl is added into your toolbox.
  3. 3.
    Drag and drop the BarCodeControl into the Forms and a Codabar image is generated.
  4. 4.
    Find Symbology" in the property panel and select "QRCode".
  5. 5.
    Select a data mode for QR Code barcode.
  6. 6.
    Then input proper data in "CodeToEncode" blanket.
  7. 7.
    A QR Code barcode is successfully created!