ImageGear .NET - Updated
Create a 1D Barcode
User Guide > How to Work with... > Barcodes > Create a 1D Barcode

Basic Steps to Create a 1D Barcode

  1. Set the value you want to create.

Property Description
BarcodeType This property gets or sets the type of barcode to create from the BarcodeType enumeration.
BarcodeValue This property gets or sets the value of the barcode to be created.
BarcodeValueAsByte This property gets or sets the current barcode value as an array of bytes used only if non-ASCII text values are needed.

  1. Call either the CreatePage method, Create method (to create an hDib) or the CreateBitmap method (to create a System.Drawing.Bitmap) from the Barcode Writer member. These methods will return an image with the desired barcode.

Method Description
CreatePage This method is the main method for creating ImGearPage barcodes.
 

There are many additional properties within the Writer class which may be used as needed in creating barcodes. See the class overview for more information.

 Examples

C# Example - Basic steps for barcode writing 1D barcodes 
Copy Code
//create the Barcode component
ImageGear.Barcode.ImGearBarcode IGBarcodeWrite = new ImageGear.Barcode.ImGearBarcode();
//set the required writer properties
IGBarcodeWrite.Writer.BarcodeType = ImGearBarcodeType.Code39Barcode;
IGBarcodeWrite.Writer.BarcodeValue = "CODE39";
//call Create and get resulting image
myImGearPage = IGBarcodeWrite.Writer.CreatePage();

 

VB.NET Example - Basic steps for barcode writing 1D barcodes
Copy Code
'create the Barcode component
Dim IGBarcodeWrite As New ImageGear.Barcode.ImGearBarcode()
'set the required writer properties
IGBarcodeWrite.Writer.BarcodeType = ImGearBarcodeType.Code39Barcode
IGBarcodeWrite.Writer.BarcodeValue = "CODE39"
'call Create and get resulting image
myImGearPage = IGBarcodeWrite.Writer.CreatePage()