C# Generating QR Code in Windows Form Application

Spread the love
C# Generating QR Code

Generating QR Code in C# Windows Form Application

You can create a simple demo by dragging the PictureBox, TextBox and Button controls from the Visual Studio Toolbox to your window form, then layout your UI as below helps you to create QR Code.

 

C# Generating QR Code

You need to install zen.barcode from the Manage Nuget Packages library in your Visual Studio in order to play the demo.As 

Step 1

Open Visual Studio ,go to file ,new  then project  select Windows Forms Application. You can change the name of project. For this first step, as in the following picture, we will create a Windows Forms application.

  

Generating QR Code
Step 2

You will need a “PictureBox”  Textbox and Button

 

C# Generating QR Code
Step 3

Now you need to addthe Zen.BarCode.Rendering.Framework  library .Follow the steps.

1.Open Solution Explorer 

2. Right Click on project 

3. Select  Manage NuGet Packages.

bar code step
qr code
Step 4

Double click on buttons to generate button Click event. Paste the following code in generate button click event. 

private void button1_Click(object sender, EventArgs e)
{
Zen.Barcode.CodeQrBarcodeDraw qrcode = Zen.Barcode.BarcodeDrawFactory.CodeQr;
pictureBox1.Image = qrcode.Draw(textBox1.Text,70);
}
Video tutorial ​

Thank you for visit. Please don’t forget to subscribe our official YouTube Channel RashiCode

Leave a Reply

Your email address will not be published.