Must DLL Gma.QrCodeNet.Encoding.dll
<summary>///Convert data to QR Code///</summary>//<param name= "Data" ></pa ram> private void Savecodefile (string data) {Qrencoder Qrencoder = new Qrencoder (errorcorrect IonLevel.H); QRCode code = new QRCode (); Qrencoder.tryencode (data, out code); const int modelsizeinpixels = 4; Draw the QR code graphicsrenderer render = new Graphicsrenderer (new Fixedmodulesize (Modelsizeinpixels, Quietzonemodules. ), Brushes.black, brushes.white); Save path string filename = @ "C:\Users\Administrator\Desktop\QrCode.Net 0.4 pre-release/" + guid.newguid () + ". png" ; Execute save picture using (FileStream stream = new FileStream (filename, filemode.create)) {rend Er. WriteToStream (code. Matrix, System.Drawing.Imaging.ImageFormat.Png, stream); }//picturebox1 Display Picture this.pictureBox1.Image = IMage. FromFile (filename); }
. NET generate QR code images