Logo 
Search:

Artificial Intelligence Forum

Ask Question   UnAnswered
Home » Forum » Artificial Intelligence       RSS Feeds

Code for creating QR Code barcodes in C#

  Asked By: Peter    Date: Jan 04    Category: Artificial Intelligence    Views: 2640
  

Hi, guys. Anyone knows QR Code barcode generation in C#? I want to create some QR Code barcodes in Java. And I tried to find some source code for this. And I found this:


using System;
using System.Collections.Generic;
using System.Text;
using OnBarcode.Barcode;
using System.Drawing.Imaging;
using System.Drawing;


QRCode qrcode = new QRCode();

// Barcode data to encode
qrcode.Data = "ONBARCODE";
// QR-Code data mode
qrcode.DataMode = QRCodeDataMode.AlphaNumeric;
// QR-Code format mode
//qrcode.Version = QRCodeVersion.V10;

/*
* Barcode Image Related Settings
*/
// Unit of meature for all size related setting in the library.
qrcode.UOM = UnitOfMeasure.PIXEL;
// Bar module size (X), default is 3 pixel;
qrcode.X = 3;
// Barcode image left, right, top, bottom margins. Defaults are 0.
qrcode.LeftMargin = 0;
qrcode.RightMargin = 0;
qrcode.TopMargin = 0;
qrcode.BottomMargin = 0;
// Image resolution in dpi, default is 72 dpi.
qrcode.Resolution = 72;
// Created barcode orientation.
//4 options are: facing left, facing right, facing bottom, and facing top
qrcode.Rotate = Rotate.Rotate0;

// Generate QR-Code and encode barcode to gif format
qrcode.ImageFormat = System.Drawing.Imaging.ImageFormat.Gif;
qrcode.drawBarcode("C:\\qrcode.gif");

/*
You can also call other drawing methods to generate barcodes

public void drawBarcode(Graphics graphics);

public void drawBarcode(string filename);

public Bitmap drawBarcode();

public void drawBarcode(Stream stream);

*/
(www.onbarcode.com/csharp/qr-code-generator.html)
But it did not work? Why is that? Anyone know about this? Thank you inadvance!!!!

Share: 

 

12 Answers Found

 
Answer #1    Answered By: Mat Galler     Answered On: Jan 28

well, maybe this article can help you a little
www.barcodelib.com/.../qrcode.html

 
Answer #2    Answered By: Harvey Martin     Answered On: Jan 30

Two-dimensional barcode generator for generating Data Matrix 2D barcodes,
www.avapose.com/.../datamatrix_generator.shtml

 
Answer #3    Answered By: Fowler HENSON     Answered On: Apr 11

You can get some help of image barcode in C# in this image barcode creating program, and also some c# sample code is offered.
www.rasteredge.com/csharp-barcode/qrcode.shtml

 
Answer #4    Answered By: Brian Fetterman     Answered On: Jul 03

Hi, peter. You should first download their C# QR Code generator library(www.onbarcode.com/csharp/qr-code-generator.html). Then you can use their sample code.

 
Answer #5    Answered By: Danny Rough     Answered On: Jul 12

to generate QR code in c# or some other formats , you can try this barcode generator.
www.rasteredge.com/.../

 
Answer #6    Answered By: Cathy Hill     Answered On: May 21

another choice to create barcode in .NET

www.keepdynamic.com/.../...barcode-generator.shtml

 
Answer #7    Answered By: Sammy Lee     Answered On: Jun 03

This thread is very beneficial for the programmer for getting the updated information.

https://www.lotteryagent.org/

 
Answer #8    Answered By: Gorge STF     Answered On: Jun 18

hi all,

refer this technical article in C#corner
www.c-sharpcorner.com/.../

 
Didn't find what you were looking for? Find more on Code for creating QR Code barcodes in C# Or get search suggestion and latest updates.




Tagged: