To print
barcode in C#, you need both true type fonts and
cruflbcsn.dll .
To get cruflbcsn.dll, you can either download it from
Barcode 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:
barcode C#.
Print Barcode In C#
Add reference to cruflbcsn.dll from your C# project first.
Use code snippet below to get a Code39 barcode in C#
using cruflbcsn;
cruflbcsn.ILinear pLinear= new CLinear();
textBox2.Text = pLinear.Code39(textBox1.Text);
Use code snippet below to get a Code128A barcode in C#
using cruflbcsn;
cruflbcsn.ILinear pLinear= new CLinear();
textBox2.Text = pLinear.Code128A(textBox1.Text);
Use code snippet below to get a GS1-128 barcode in C#
using cruflbcsn;
cruflbcsn.ILinear pLinear= new CLinear();
textBox2.Text = pLinear.GS1128(textBox1.Text);
Use code snippet below to get a UPC-A barcode in C#
using cruflbcsn;
cruflbcsn.ILinear pLinear= new CLinear();
textBox2.Text = pLinear.UPCA(textBox1.Text);
Use code snippet below to get a EAN13 barcode in C#
using cruflbcsn;
cruflbcsn.ILinear pLinear= new CLinear();
textBox2.Text = pLinear.EAN13(textBox1.Text);
Use code snippet below to get a Interleaved 2of5 barcode in C#
using cruflbcsn;
cruflbcsn.ILinear pLinear= new CLinear();
textBox2.Text = pLinear.I25Check(textBox1.Text);
Here is a list of all available methods you can call from C#: