本文介绍了如何在C#窗体中打印qr代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在c #windows形式的visual studio 2015工作,我需要使用c#
windows窗体打印qr代码我已生成但无法打印。
任何人都可以告诉我如何打印生成的qr代码如下:
I worked in c# windows form visual studio 2015 and i need to print qr code using c#
windows form I already generated it but cannot print .
Can any one tell me how to print qr code generated as following :
if (textBox1.Text =="")
{
MessageBox.Show("Please Enter Value ","Error");
textBox1.Focus();
}
else
{
using (SaveFileDialog sv = new SaveFileDialog() { Filter = "JPEG|.jpg", ValidateNames = true })
{
if (sv.ShowDialog() == DialogResult.OK)
{
MessagingToolkit.QRCode.Codec.QRCodeEncoder encoder = new MessagingToolkit.QRCode.Codec.QRCodeEncoder();
encoder.QRCodeScale = 8;
string encoding="UserName : " + textBox1.Text + "\r\n" + "CardNo : " + textBox2.Text + "\r\n" + "Address:" + textBox3.Text + "\r\n"+textBox5.Text;
Bitmap bmp = encoder.Encode(encoding);
pictureBox1.Image = bmp;
bmp.Save(sv.FileName, ImageFormat.Jpeg);
}
}
}
}
我尝试了什么:
如何在c#windows窗体中打印qr代码
What I have tried:
how can i print qr code in c# windows form
推荐答案
这篇关于如何在C#窗体中打印qr代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!