Our Customers
Contact Us Email: support@barcodelib.com
Home > .NET WinForms Barcode > Windows Forms Barcode Generation Guide > C# QR Code Generation for WinForms Applications
Download Barcode for .NET WinForms Trial

Use C# Code to Generate QR Code in Windows Forms

How to Generate & Encode QR Code in WinForms Project Using C# class codes
  • Mature C#.NET WinForms QR Code barcode generating control since 2003
  • Written in managed C# & compatible with main .NET development platforms
  • Generate QR Code barcode in Windows Forms Controller & C# class WinForms
  • Adjust generated QR Code property settings using C# class in Windows Forms
  • Generated QR Code barcode images meet international & latest industry standards
  • Offer flexible & loyalty-free developer licenses for C#.NET programmers
WinForms C# QR Code Barcode Generator - Requirement
  • BarcodeLib.Barcode.WinForms.dll
  • Microsoft .NET Framework 2.0 or above
  • Visual Studio .NET 2005 or above
.NET Windows Forms Controller - C# QR Code Generation
Download & unzip trial package, then locate WinForms QR Code barcode generator dll - BarcodeLib.Barcode. WinForms.dll.
  1. Add "BarcodeLib.Barcode.WinForms.dll" to your WinForms C# project Toolbox.
    Right click "Toolbox", select "Choose Items...", and locate "BarcodeLib.Barcode.WinForms.dll". Then, you'll find four new-added components, including "QRCodeWinForm".
  2. Under "barcode" folder of the trial package, copy files "qrcode.aspx", "qrcode.aspx.cs" to your WinForms project folder.
  3. Drag "QRCodeWinForm" to aspx page and then run the project to see the generated QR Code image.
  4. If you want to customize the QR Code image properties, you may directly adjust the settings in the "Properties" window or using following C# class code.
     this.QRCodeASPNET1.Data = "QRCODE";
     this.QRCodeASPNET1.ModuleSize = 2;
     this.QRCodeASPNET1.LeftMargin = 8;
     this.QRCodeASPNET1.RightMargin = 8;
     this.QRCodeASPNET1.TopMargin = 8;
     this.QRCodeASPNET1.BottomMargin = 8;
     this.QRCodeASPNET1.ECL = BarcodeLib.Barcode.QRCodeErrorCorrectionLevel.M;
.NET WinForms Class - QR Code Barcode Generation Using C#
  1. Add "BarcodeLib.Barcode.WinForms.dll" to your Windows Forms C# project "Reference".
    In Solution Explorer window, right click on your project, select "Add Reference...", and locate "BarcodeLib.Barcode.WinForms.dll".
  2. Then, copy & paste following Visual C# sample code to generate & print QR Code in your .NET Windows Forms projects.
     QRCode qrcode = new QRCode();
     qrcode.Data = "QRCODE";
     qrcode.ModuleSize = 4;
     qrcode.ECL = QRCodeErrorCorrectionLevel.L;
     qrcode.ImageHeight = 118;
     qrcode.ImageWidth = 118;

     // Save & output QR Code barcode image to your system
     qrcode.ImageFormat = System.Drawing.Imaging.ImageFormat.Gif;
     qrcode.drawBarcode("C:/sample-qrcode.gif");
Read more sample C# code to generate QR Code in WinForms applications. As well, we provide developer guide for .NET WinForms QR Code Generation in VB.NET Class.
Barcode for .NET WinForms - Create Linear & Matrix Barcodes
Besides QR Code, over 20 linear & 2d barcode types are supported by C#.NET WinForms barcode generator.
  • Generate & print 1D Barcodes in C# WinForms: Codabar, Code 11, Code 2 of 5, Code 39, Code 93, Code 128, EAN-8, EAN-13, GS1-128, Interleaved 2 of 5, ITF-14, MSI Plessey, Intelligent Mail, PLANET, POSTNET, RM4SCC, UPC-A, UPC-E.
  • Generate & print 2D Barcodes in C# WinForms: Data Matrix and PDF-417. Please click "Go" to see each barcode generation details.
WinForms 1D Barcodes:
WinForms 2D Barcodes: