4 Replies - 1704 Views - Last Post: 01 January 2017 - 02:43 PM Rate Topic: -----

#1 ahmedba   User is offline

  • D.I.C Head

Reputation: -1
  • View blog
  • Posts: 220
  • Joined: 24-January 14

How to print qr code using c# windows form

Posted 26 December 2016 - 04:28 PM

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 search more in the internet How to print qr code but not found any thing related to printing qr code

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);  
              }  
  
          }  
          }  
  
      }  


Is This A Good Question/Topic? 0
  • +

Replies To: How to print qr code using c# windows form

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15790
  • View blog
  • Posts: 63,277
  • Joined: 12-June 08

Re: How to print qr code using c# windows form

Posted 26 December 2016 - 04:31 PM

What have you looked into for printing a bitmap or text?
Was This Post Helpful? 0
  • +
  • -

#3 ahmedba   User is offline

  • D.I.C Head

Reputation: -1
  • View blog
  • Posts: 220
  • Joined: 24-January 14

Re: How to print qr code using c# windows form

Posted 01 January 2017 - 12:27 PM

I need to print bitmap not text
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15790
  • View blog
  • Posts: 63,277
  • Joined: 12-June 08

Re: How to print qr code using c# windows form

Posted 01 January 2017 - 12:29 PM

Fine. What have you looked into for printing?
Was This Post Helpful? 0
  • +
  • -

#5 Skydiver   User is offline

  • Code herder
  • member icon

Reputation: 7447
  • View blog
  • Posts: 25,086
  • Joined: 05-May 12

Re: How to print qr code using c# windows form

Posted 01 January 2017 - 02:43 PM

On Windows, printing text and images is done exactly the same way.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1