The attached VS2010 project contains the minimum code required to write a barcode on an image using LEADTOOLS 18.
It is based on the OpenSaveDemo shipped with the toolkit, and writes sample EAN 13 barcode using only these 4 lines of code:
============================================================
Leadtools.Barcode.BarcodeEngine engine = new Leadtools.Barcode.BarcodeEngine();
Leadtools.Barcode.BarcodeData data = new Leadtools.Barcode.BarcodeData(Leadtools.Barcode.BarcodeSymbology.EAN13, "012345678901");
data.Bounds = new Leadtools.Forms.LogicalRectangle(50, 50, 300, 100, Leadtools.Forms.LogicalUnit.Pixel);
engine.Writer.WriteBarcode(_viewer.Image, data, null);
============================================================
Other types of barcodes can be written just as easily by selecting a different BarcodeSymbology value. For example, you can add the following code to write Code 3 of 9:
============================================================
data = new Leadtools.Barcode.BarcodeData(Leadtools.Barcode.BarcodeSymbology.Code3Of9, "01234567");
data.Bounds = new Leadtools.Forms.LogicalRectangle(50, 150, 300, 100, Leadtools.Forms.LogicalUnit.Pixel);
engine.Writer.WriteBarcode(_viewer.Image, data, null);
============================================================
Amin Dodin
Senior Support Engineer
LEAD Technologies, Inc.