Generate QR Codes in Windows Forms Using .NET

17 Dec

Generate QR Codes in Windows Forms Using .NET

QR Code is widely used in various applications and it can be easily generated in .NET applications. This .NET barcode component can be used by adding reference on Windows Forms application or just add it as item on toolbox in Visual Studio.

 It is easy to insert QR Codes into ASP.NET, Windows Forms applicaiton.

Create New Winforms with C#/VB.NET Class library

  1. Open Visual Studio then create an Windows Forms project using C#/VB.NET programming;
  2. Install the .NET barcode generator in Windows Forms.
  3. Change barcode parameters in property setting panel or just input the code sample below to generate QR Code.

VB Codes:

Dim qrcode As Aspper.Barcode.Bean.BarCode = New Aspper.Barcode.Bean.BarCode

        qrcode.Symbology = Aspper.Barcode.Symbology.QRCode

        qrcode.CodeToEncode = “QRcode”

        qrcode.X = 4

        qrcode.Y = 4

        qrcode.ImageFormat = System.Drawing.Imaging.ImageFormat.Png


C# Codes:

   Matrix qrcode = new Matrix();

            qrcode.BarcodeType = MatrixBarcode.Qrcode;

            qrcode.Valid_Data = “Qrcode”;

            qrcode.Version_Qrcode = QrcodeVersion.M4_L;

            qrcode.Bar_Alignment = AlignmentHori.Center;

            qrcode.Auto_Resize = true;

            qrcode.Width_X = 1;

            qrcode.WtoH_Ratio = 1;



More sample code listing, please refer to for tutorial.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: