How do I generate barcode using c#?

How to generate Random Number and Barcode in windows form Using C#?

  • I am creating Windows application using C#. Here i have 6 numbers Batch Key:abc123 product Key:xyz456 Order key:mno789 batch Number:12345 product Number:45678 order key:97354 Here i want to generate random number using these 6 numbers and In a single button click i want generate Barcode for that random Number .

  • Answer:

    Barcodes are simply fonts, you will need to download and incorporate a barcode font into your application. See: http://www.dafont.com/barcode-font.font Generate a random number between 0 and 100 Random random = new Random(); int randomNumber = random.Next(0, 100);

Appu at Stack Overflow Visit the source

Was this solution helpful to you?

Other answers

First you should choose which barcode format to use (http://en.wikipedia.org/wiki/Barcode#Linear_barcodes). Once you know this you can use something like the http://www.codeproject.com/KB/graphics/BarcodeLibrary.aspx to generate your barcode image simply. This library can handle many different barcode specifications.

Jason

You may want to try Barcode.dll for barcode rendering: http://www.lesnikowski.com/barcode/ It includes http://www.lesnikowski.com/barcode/tutorial/WinFormsTutorial.aspx - just drag & drop. Please note that this is a commercial product I developed.

Pawel Lesnikowski

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.