HOWTO: Add Barcodes to an AtalaImage in our ImageViewer WinForms Control


The BarcodeWriter class can be used to add barcodes to an AtalaImage. The following code is a simple example to add a barcode to an image in a viewer in the location of the rectangle selection:

C#

    BarcodeWriter writer = new BarcodeWriter(BarcodeStyle.Code39);
    writer.Render("00100",imageViewer1.Image.GetGraphics(), imageViewer1.Selection.Bounds);
    imageViewer1.Refresh();

VB.NET

 
    Dim writer As New BarcodeWriter(BarcodeStyle.Code39)
    writer.Render("00100", imageViewer1.Image.GetGraphics(), imageViewer1.Selection.Bounds)
    imageViewer1.Refresh()

Original Article:
Q10292 - HOWTO: Add Barcodes to an AtalaImage in our ImageViewer WinForms Control