Topic : How to Generate QR code & BRcode Using C# Programming Language:

What is QR Code:

QR Code, abbreviated from Quick Response code is a two-dimensional barcode that is readable by smartphones. It allows to encode Over 4000 characters in a two-dimensional barcode. QR codes may be used to Display text to the user to open a URL, save a contact to the address book or to compose text messages. A QR code consists of Black Squares arranged in a Square Grid on a White Background, which can be read by an Imaging device such as a QR Scanner. ( Read more... )



Barcode & QR Code: infobrother

What is Barcode:

A Barcode is a Square or Rectangular Image Consisting of a Series of parallel back lines and white spaces of Varying widths that can be read by a scanner. Barcodes are Applied to products as a means of Quick Identification. They are used is retail stores as part of the Purchase process, in a Warehouses to track inventory, and on invoices to assist in Accounting, among many other uses. ( Read more... )



In this tutorial, we will create an application to generate QR code, and Barcode in C# using Zen Barcode. just follow the given simple steps to create this application:



  • Open Visual Studios, create new Project ( Visual C# > Windows forms Application ) write the Project name and click ok. Drag and Drop the control on form as show in picture.


Barcode & QR Code: infobrother

Barcode Rendering Framework:

Now to Move on, we need to Install Barcode Rendering Framework in our Visual studio. To install it, follow the given steps:


  • » From Solution Explorer Write Click on your Project Name, and select Manage NutGet Packages.
    » Search for Zen Barcode
    » Select the first latest version.
    » Click Install.

    Now Our Barcode Rendering Framework has been install, now we can move on.



Barcode & QR Code: infobrother

Barcode Generate:

Double Click on the Barcode "Generate" Button and write the given Code:


//Code for Barcode "Generate" Button:
private void btnBarcode_Click(object sender, EventArgs e)
{
   Zen.Barcode.Code128BarcodeDraw barcode = Zen.Barcode.BarcodeDrawFactory
                                               .Code128WithChecksum;
   pictureBox.Image = barcode.Draw(txtBarcode.Text, 50);
}


QR Code Generate:

Double Click on the QR code "Generate" Button and write the given Code:


//Code for QRcode "Generate" Button:
private void btnQRcode_Click(object sender, EventArgs e)
{
   Zen.Barcode.CodeQrBarcodeDraw qrcode = Zen.Barcode.BarcodeDrawFactory.CodeQr;
   pictureBox.Image = qrcode.Draw(txtQRcode.Text, 50);
}


Run the Program write some text or any link, and click on Generate button. Install any application in your mobile to read Barcode and QR code, and check to make sure that this application is working:



Barcode & QR Code: infobrother

















I Tried my Best to Provide you complete Information regarding this topic in very easy and conceptual way. but still if you have any Problem to understand this topic, or do you have any Questions, Feel Free to Ask Question. i'll do my best to Provide you what you need.

Sardar Omar.
InfoBrother





WRITE FOR INFOBROTHER

Advertising






Advertisement