To print
QR Code in C#, you need both
bcsqrcode.ttf true type font and
cruflbcsn.dll .
To get cruflbcsn.dll, you can either download it from
qr code C# ,
or you can generate cruflbcsn.dll if you already have cruflbcs.dll.
tlbimp is a utility of Windows SDK. It converts type definitions of a COM object to equivalent definitions in a common language runtime assembly that you can use in C#.
tlbimp cruflbcs.dll /out:cruflbcsn.dll
Most updated cruflbcs.dll can be download from the following URL:
QR code C#.
Print QR Code In C#
Add reference to cruflbcsn.dll from your C# project first.
Then use code snippet below to get QR Code in C#
using cruflbcsn;
cruflbcsn.IQRCode pQRCode = new CQRCode();
textBox2.Text = pQRCode.Encode(textBox1.Text);
Or you can use code snippet below to customize a
QRCode in C#
using cruflbcsn;
cruflbcsn.IQRCode pQRCode = new CQRCode();
textBox2.Text = pQRCode.EncodeCR(textBox1.Text, 0, 1);
The first parameter is string to encode.
The second parameter is index. Always set it to zero please.
The third parameter is security level. Its values range between 0 and 3. It stands for L07, M15, Q25 and H30 separately.