QR Code二维条码应用十分广泛,开发人员使用Barcode Xpress不仅可以轻松创建QR Code,也可以读取QR Code,下面的代码简单描述
了如何使用Barcode Xpress条码控件创建QR Code二维条码,具体如下:
//create and unlock the BarcodeXpress component
BarcodeXpress bcx = new BarcodeXpress();
// The SetSolutionName and SetSolutionKey methods must be called to distribute the runtime.
bcx.Licensing.SetSolutionName("YourSolutionName");
bcx.Licensing.SetSolutionKey(12345,12345,12345,12345);
// The SetOEMLicenseKey method is required if Manually Reported Runtime Licensing is used.
bcx.Licensing.SetOEMLicenseKey("1.0.AStringForOEMLicensing");
//Create the writer QRCode class
WriterQRCode qrCode = new WriterQRCode(bcx);
// Set the text value
qrCode.BarcodeValue = "QR Code Value";
//call Create and get resulting image
if (imageXView1.Image != null)
imageXView.Image.Dispose();
imageXView1.Image = Accusoft.ImagXpressSdk.ImageX.FromHdib(ImagXpress1, qrCode.Create(), true);
// dispose of the writer QR Code and barcode component
qrCode.Dispose();
bcx.Dispose();