dLSoft

Quick_links...

Search site
Trial products
Online tutorials

Products

Barcodes for Office
Barcode creators
Barcode fonts
Developer tools
Label printing
Labelling tools
Windows Phone

Resources

New to barcodes?
How To ...
Support centre
Tutorial centre
Which product

For users

Common problems
What's New?
Newsletter
Online registration
Contact us

GS1

Award 2009

Award 2008

Powered by a
UK2 VPS

Barcode components for .NETMicrosoft, Visual Studio, and the Visual Studio logos are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries

dBarcode.NET Components

Add barcodes to your .NET and ASP.NET projects

dBarcode .NET Components are managed code barcode components that allow barcode images to be created within the developer’s own .NET Windows Form or ASP.NET application. A barcode image may be displayed on screen or printed on a printer, and the image may be passed to any other image-handling component.

dBarcode .NET Components are designed to work with Visual Studio 2005/2008/2010 and require the .NET Framework 2.0 (or later) to be installed on any computer using the components. Example code for Windows Forms is provided with each component for users of Visual Basic .NET and C#. An example ASP.NET application is included and may be seen online here.

Screen shots - click images to enlarge

Barcode component in design view        barcode component at run time          non-ASCII characters in barcodes
            Design view                      Sample application with Properties dialog                      non-ASCII languages

The components

There are several components in the dBarcode .NET Components family, one for each of the most popular 2D barcode types, and some which handle a wide range of different barcode types. The components are:

To download a TestWare version now  or buy from the online store select the required product below.
All downloads include components for .NET Framework and 2.0 and later.

  •  dBarcode.NET Dual Universal - supports all of the 1D, 2D and GS1-Composite barcode types of the components below in a single component (supports .NET version 2.0 and later only).
  •  dBarcode.NET 1D Universal – for most common barcode types (over 50 types supported, including Codabar, Code 128, Code 39, DeutschenPost, EAN/UCC-13, EAN/UCC-14, EAN/UCC-128, HIBC, IATA 2 of 5, InfoMail, Intelligent Mail, Interleaved 2 of 5, ISBN, ISSN, ISMN, Japan Post, MSI, Plessey, Postnet, Planet and RM4SCC).
  •  dBarcode.NET 2D Universal - for most common 2D barcode types - Aztec, DataMatrix, Maxicode, PDF417, Truncated PDF417, Micro PDF, *QR-Code, *Micro QR and GS1-DataBar (formerly RSS).
  •  dBarcode.NET_Composite - for GS1 Composite barcodes (supports .NET version 2.0 and later only).

or for limited barcode type support:

* These components can also encode Unicode characters.

Features

  •   Create high resolution metafile or EPS images (.NET 2 or later components only)
  •   Save to graphics files or memory streams in a variety of formats (BMP, EPS, GIF, JPG, PNG, TIF, WMF).
  •   Barcodes may be rotated through any angle or created as a mirror image.
  •    Margin indicators and bearer bars may be turned on/off for codes which support these features.
  •   Font properties, text justification, bar colour and background colour may be user selected.
  •   Wide/Narrow ratios may be adjusted for barcode type that support this.
  •   Bar width control for wet-ink printing allows 0 - 50% width reduction.
  •   Fully serializeable

View the product Help files.

Licensing

Each dBarcode.NET component is available as a single computer version, or as a developer version which permits royalty-free distribution of the component as part of the developer's own project for up to 10,000 distributions.

System Requirements

Windows XP/2003/Vista/Windows 7 with Microsoft .NET Framework
Designed for use with Visual Studio 2005/2008/2010/.NET Framework 2.0 or later
Supports x32, x64 and IA64.
ASP.NET requires Microsoft IIS and .NET ramework 2.0 or later.


Using with Visual Studio

Adding a dBarcode.NET Component to the Visual Studio ToolBox

To add a dBarcode Component to the Visual Studio ToolBox, display the ToolBox and select the Components tab. Right click on the Components pane and select Add/Remove Items.. from the pop-up menu displayed. A dialog box is displayed listing the currently installed components. Ensure that the .NET Framework Components page is displayed.

Push the Browse button and navigate to the location where you have installed or copied your dBarcode.NET component and select the DLL (e.g. AbcnetLib.dll).

Then push the Open button.

The list of installed components is now displayed, including your dBarcode.NET component. Ensure that the checkbox alongside the component name is checked. Now push the OK button.

Adding a dBarcode.NET component to a project.

With a project's form open in design mode drag the dBarcode.NET component icon from the toolbox onto the form.

The component icon appears on the panel below the form – it does NOT appear on the form itself. The instance of the component will be given a default name (eg Abcnet1) which appears in the properties panel when the component is selected. A single Form may contain any number of dBarcode.NET Components. The first to be added will be called Abcnet1, the second Abcnet2, and so on; the names may be changed by the user by modifying the Name property within the Properties box.

The properties panel also displays all other settable properties for the component, and these values will be used as defaults unless properties are changed programmatically within your project.


Using on ASP.NET pages

There are many possible approaches to generating barcode images for ASP.NET pages. Whatever method is chosen it is important to ensure that the image is created at a higher graphics resolution than the normal 96 dpi used for web images - because the width of the bars is important.

One method, suitable for use when the barcode is to be data-dependent, is to use two aspx files, one which creates a memorystream barcode image using one of the dBarcode.NET components and then uses a dummy ASP.NET page as the SRC for an IMG tag to display the image at the correct size, eg.

<script language="vb" runat="server">
sub Page_Load(Sender As Object, E As EventArgs)
…………………..
m_barcode.Unit = GraphicsUnit.Inch
m_barcode.XUnit = 0
m_barcode.Font=m_Font
m_barcode.Orientation=0
m_barcode.AutoCheckdigit=TRUE
m_barcode.BarcodeHeight = tht     ' desired height in inches
m_barcode.BarcodeWidth = twd    ' desired width in inches
m_barcode.CodeTypeValue = 8
m_barcode.caption = Session("xx")
Session("ms")=m_barcode.sBarcode(300,300,System.Drawing.Imaging.ImageFormat.Png)
if Session("ms").Length>0 then
Session("ht")=m_barcode.ImageHeight*96/300 ' adjust size for the desired image resolution
Session("wd")=m_barcode.ImageWidth*96/300
end if
</script>
</head>
<BODY>
<H1>dLSoft dBarcode.NET - on ASP.NET</H1>
<IMG SRC="page2.aspx" HEIGHT=" <% =Session("ht") %> " WIDTH=" <% =Session("wd") %> ">
<p> dBarcode.NET components can generate barcode images in BMP, GIF, PNG, JPG, TIF and WMF formats, and for more than 50 barcode types.
</BODY>
</HTML>

The Session variables ht and wd contain the actual sizes at which the barcode image is to be drawn on the web page. These are calculated when the page is loaded and used when the IMG SRC calls the second page.

The second file (page2.aspx) serves up the image at the correct size, eg.
<%@ LANGUAGE="VB"%>
<%
Response.ContentType="image/png"
Response.BinaryWrite(Session("ms").GetBuffer())
%>

A working sample is included with each dBarcode.NET component distribution, and the technique may be seen in operation at our Barcodes Online service.