直接添加引用zxing.dll,调用如下方法生成Bitmap然后可以打印或显示出来:privateBitmapGetQRCodeByZXingNet(StringstrMessage,Int32width,Int32height){Bitmapresult=null;try{BarcodeWriterbarCodeWriter=newBarcodeWriter();barCodeWriter.Format=BarcodeFormat.CODE_128;