C#中的条形码扫描仪 [英] BarCode Scanner in C#
本文介绍了C#中的条形码扫描仪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用c#在asp.net中生成和扫描条形码。
How to Generate and scan barcode in asp.net using c#.
推荐答案
相同的代码是:
-Downdload DLL 这里
-include reference:
The code for the same is:
-Downdload DLL here
-include reference:
using MessagingToolkit.QRCode.Codec;
using MessagingToolkit.QRCode.Codec.Data;
从图像生成条形码:
to generate barcode from image:
string url = textBox1.Text;/*textbox string is converted to qrcode*/
QRCodeEncoder enc = new QRCodeEncoder();
Bitmap qrcode = enc.Encode(url);
pictureBox1.Image = qrcode as Image;
和解码
and to decode
QRCodeDecoder dec = new QRCodeDecoder();
textBox2.Text = (dec.decode(new QRCodeBitmapImage(pictureBox1.Image as Bitmap)));/*qrcode is reverted back to string*/
这是一个有趣的网站..
点击 [ ^ ]
here is one interesting site..
click[^]
这篇关于C#中的条形码扫描仪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文