How to register a global hotkey for your application in C#

How to register a global hotkey for your application in C#

Register a hotkey for your application that can be triggered even if your form is minimized and does not have focus. More »

How to download a file in C# (progressbar and download speed)

How to download a file in C# (progressbar and download speed)

Learn how to download files in C# while displaying the percentage and the download speed. More »

UDP hole punching implementation in C#

UDP hole punching implementation in C#

Learn how to implement UDP hole punching so you can make your clients life a lot easier by not forcing them to open ports on their end. More »

 

How to generate QR barcodes in C#

QR barcodes are machine-readable optical labels that contain certain information. Today we will be looking into how to generate QR codes with the use of the ZXing.Net library.

First you will need to download the ZXing.Net library from zxingnet.codeplex.com. Extract the contents of the file you have downloaded and reference the library that fits your needs in your project.

Using the example code below you will now be able to create your own QR codes.

Example: Calling the following method will return a Bitmap object which you can save using the Bitmap’s Bitmap.Save() method or simply display it within your application.

Fluxbytes QR code example

Share on FacebookTweet about this on TwitterShare on Google+Share on StumbleUponShare on LinkedInShare on RedditPin on PinterestShare on TumblrDigg thisPrint this pageEmail this to someone

7 Responses to How to generate QR barcodes in C#

  1. Nox says:

    I get the below error where the image is supposed to be..

    System.Drawing.Bitmap; }

    • Nox says:

      I have the below as my method:

      And using razor to call this method for a string that I want shown as QR Code:

      @vth.GenerateQR(item.name);

  2. tamir batdorj says:

    ‘Bitmap’ does not contain a constructor that takes 1 arguments

  3. Sepehr says:

    Thank you :-)

  4. EZAMA says:

    THANKS ALOT FOX

  5. Pedro Vinicius says:

    VERYYYYY GOOOD !!

  6. Damian says:

    Great example. That I was looking for. But now I have some problems to show qrcode in my WPF window :/

Leave a Reply

Your email address will not be published. Required fields are marked *