标签:des io ar os sp on cti bs ad
Image _qRImg= GetQRCodeImage(要写入二维码的参数);
PictureBox pb = new PictureBox();
pb.Size = _qRImg.Size;
pb.Image = _qRImg;
pb.Left = (int)(double.Parse(ds.Tables[0].Rows[i]["FieldX"].ToString()) * 0.5);
pb.Top = (int)(double.Parse(ds.Tables[0].Rows[i]["FieldY"].ToString()) * 0.5);
palMainPrew.Controls.Add(pb);
public Image GetQRCodeImage(string cqNum)
{
QRCodeEncoder qrCodeEncoder = new QRCodeEncoder();
qrCodeEncoder.QRCodeEncodeMode = QRCodeEncoder.ENCODE_MODE.BYTE;
qrCodeEncoder.QRCodeScale = 2;
qrCodeEncoder.QRCodeVersion = 5;
qrCodeEncoder.QRCodeErrorCorrect = QRCodeEncoder.ERROR_CORRECTION.M;
return qrCodeEncoder.Encode(cqNum);
}
标签:des io ar os sp on cti bs ad
原文地址:http://www.cnblogs.com/MyBeN/p/4118771.html