.NET Barcode Generation Tutorial
How to generate linear & 2D barcodes in .NET projects?
.NET Barcode Generator offers the most affordable .NET barcode generator for barcode .NET professionals.
How to generate barcodes in C#.NET Class?
The following C# .NET code illustrates how to generate a barcode in C# class:
using KeepDynamic.Barcode.Generator;
BarCode barcode = new BarCode();
barcode.SymbologyType = SymbologyType.Code128;
barcode.CodeText = "Code128";
barcode.Format = ImageFormat.Png;
barcode.drawBarcode("C://barcode-code128-csharp.png");
barcode.drawBarcode("Graphics object");
barcode.drawBarcode("Stream object");
How to generate barcodes in VB.NET Class?
The following VB.NET code illustrates how to generate barcodes in VB.NET class:
// Create linear barcode object in VB.NET
Dim barcode As KeepDynamic.Barcode.Generator.BarCode
barcode = New KeepDynamic.Barcode.Generator.BarCode()
// Set barcode symbology type to Code-128 in VB.NET
barcode.SymbologyType = SymbologyType.Code128;
// Set barcode value in VB.NET
barcode.CodeText = "Code128"
// Set barcode drawing image format to PNG in VB.NET
barcode.Format = ImageFormat.Png
// Generate barcode & encode to the png image in VB.NET
barcode.drawBarcode("C://barcode-code128-vbnet.png")
// Generate barcode & print to System.Drawing.Graphics object in VB.NET
barcode.drawBarcode("Graphics object")
// Create barcode & draw to System.IO.Stream object in VB.NET
barcode.drawBarcode("Stream object")
Creating barcodes using .NET Barcode Generator Windows Form Control
To create barcodes in C# & VB.NET Windows Forms applications, do the following procedures:
- Add KeepDynamic.BarCode.Windows.dll to your C#, VB.NET project reference
- Add KeepDynamic.BarCode.Windows.dll to windows project toolbox
- Drag the one of the
BarCodeControl,
DataMatrixControl,
PDF417Control,
QRCodeControl item to your windows forms
Creating barcodes using ASP.NET Barcode Generator ASP.NET Web Form Control
To create barcodes in ASP.NET Web Forms applications, do the following procedures:
- Add KeepDynamic.BarCode.AspNet.dll to your C#, VB.NET project reference
- Add KeepDynamic.BarCode.AspNet.dll to windows project toolbox
- Drag the one of the
BarCodeControl,
DataMatrixControl,
PDF417Control,
QRCodeControl item to your ASP.NET Web form pages, in your ASP.NET design view
.NET Barcode Generator supports most common linear (1d) and matrix (2d) bar code standards, including: