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... )
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:
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:
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: