Generate Code 128 in Windows Forms Using .NET
Code 128 is capable to encode large amount of data into small space. It is easy to use .NET barcode generation SDK. It can be used as generation DLL and integrated with C#.NET/VB.NET class library for barcode generation.
Create New .NET Project with C#/VB.NET Class library
- Open Visual Studio then create an Windows Forms project using C#/VB.NET programming;
- Install the .NET barcode generator in Windows Forms.
- Change barcode parameters in property setting panel or just input the code sample below to generate Code 128.
VB Codes:
Dim code128 As Aspper.Barcode.Bean.BarCode = New Aspper.Barcode.Bean.BarCode
code128.Symbology = Aspper.Barcode.Symbology.Code128Auto
code128.CodeToEncode = “128test”
code128.X = 2
code128.ImageFormat = System.Drawing.Imaging.ImageFormat.Gif()
code128.generateBarcodeToImageFile(“C://code128-vb-net.gif”)
code128.ApplicationIndicator = 0
code128.FNC1 = Aspper.Barcode.FNC1.None
code128.TildeEnabled = False
C# Codes:
BarCode code128 = new BarCode();
code128.Symbology = Aspper.Barcode.Symbology.Code128Auto;
code128.CodeToEncode = “128data”;
code128.X = 2;
code128.generateBarcodeToImageFile(“C://code128-csharp.png”);
code128.ApplicationIndicator = 0;
code128.FNC1 = Aspper.Barcode.FNC1.None;
code128.TildeEnabled = false;
Code 128 Code Set A, Code 128 Code Set B and Code 128 Code Set C are supported by this barcode generator.
More sample code listing, please refer to www.aspper.com for tutorial.
Sybil





