Click or drag to resize
Barcode.dll - How to start

After installation, this class reference, C# and VB.NET examples can be found in your Start menu.

Go here for licensing and general help, and here for ordering.

Note Note

If you need help, please visit our technical Q&A forum. You can find many samples online.

Add reference and namespaces

First you have to add reference to Barcode.dll to your project. See MSDN how to. Then add all namespaces you need:

// C#

using Limilabs.Barcode;
using System.Drawing.Imaging;
Render barcode

// C#

using Limilabs.Barcode;
using System.Drawing.Imaging;

BaseBarcode barcode = BarcodeFactory.GetBarcode(Symbology.EAN13);

barcode.Number = "123456789012";
barcode.ChecksumAdd = true;

// Render barcode:
this.pictureBox1.Image = barcode.Render();

// You can also save it to file:
barcode.Save("c:\\barcode.gif", ImageFormat.Gif);
ASP.NET control
  1. Create new ASP.NET project

  2. Add new web.config file if you don't have one.

  3. Set up an HttpHandler in an ASP.NET web application, add the following code to your web.config file:

    • Register an HTTP handler for IIS 6.0:

      <configuration>
        <system.web>
          <httpHandlers>
            <add verb="*" path="Barcode.axd"
              type="Limilabs.Web.BarcodeHttpHandler" />
          </httpHandlers>
        </system.web>
      </configuration>
    • Register an HTTP handler for IIS 7.0 and IIS 8.0 running in Integrated Mode:

      <configuration>
        <system.webServer>
          <handlers>
            <add name="BarcodeHttpHandler" verb="*"
              path="Barcode.axd"
              type="Limilabs.Web.BarcodeHttpHandler, Barcode"
              resourceType="Unspecified" />
          </handlers>
        </system.webServer>
      </configuration>
    • Register an HTTP handler for IIS 7.0 and IIS 8.0 running in Classic mode:

      <configuration>
        <system.web>
          <httpHandlers>
            <add verb="*" path="Barcode.axd" type="Limilabs.Web.BarcodeHttpHandler, Barcode" />
          </httpHandlers>
        </system.web>
        <system.webServer>
          <add name="BarcodeHttpHandler" verb="*"
            path="Barcode.axd"
            Modules="IsapiModule"
            scriptProcessor="FrameworkPath\aspnet_isapi.dll"
            resourceType="File" />
        </system.webServer>
      </configuration>

      ...remember to replace FrameworkPath with the correct path to the Aspnet_isapi.dll file.

    • If you are using VS2003 use the following:

      <httpHandlers>
          <add
            verb="*"
            path="Barcode.axd"
            type="Limilabs.Web.BarcodeHttpHandler, Barcode"  />
      </httpHandlers>
  4. If BarcodeControl is not present in the toolbox:

    • use the right mouse button on toolbox,

    • click 'Choose items...' or 'Add/Remove Items'

    • Find 'BarcodeControl' on '.NET Framework Components' tab or click 'Browse' and point 'Barcode.dll' file

  5. Drag and drop BarcodeControl from toolbox to your webpage. This will add the reference to Barcode.dll to your project.

Windows control
  1. Create new WindowsForms project

  2. If BarcodeControl is not present in the toolbox:

    • use the right mouse button on toolbox,

    • click 'Choose items...' or 'Add/Remove Items'

    • Find 'BarcodeControl' on '.NET Framework Components' tab or click 'Browse' and point 'Barcode.dll' file

  3. Drag and drop BarcodeControl from toolbox to your Windows Form. This will add the reference to Barcode.dll to your project.

Samples online
Note Note

If you need help, please visit our technical Q&A forum. You can find many samples online.