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
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:
- How to Set Specific Site Collection as SharePoint Search Scope using C#?Best solution by SharePoint
- how to generate random isotropic vectors using R?Best solution by Stack Overflow
- How to generate cryptographically random numbers?Best solution by Stack Overflow
- How to generate random number each time?Best solution by Stack Overflow
- How to count the number of lines in a file using Bash?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
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.