Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
Print qr code in windows form c#
ahmed salah
Dec 26 2016 2:00 PM
609
Reply
I work in visual studio 2015 windows form application and i need to print qr code by using c#
How can i print qr code generation ?
I generated using the following code :
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);
}
}
}
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
updating a asp.net 4.0 webform ui controls from a Task
ApplicationPath only works in IDE