dLSoft  barcode & labelling software     

Barcode components for .NET 

dBarcode.NET Components

Add barcodes to your .NET and ASP.NET projects

dBarcode .NET products included managed code WinForms Controls and 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.

Compatible with Visual Studio 2005 - 2017.
Watch the video to see the WinForms design-time system

dBarcode .NET products are designed to work with Visual Studio 2005-2015 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 control and component for users of Visual Basic .NET and C#. An example ASP.NET application is included and may be seen online here.

Screen shots

dBarcode.Net Control
Sample control at design-time...

Control at run-tim
.... a Control at run-time

 

The products

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 and controls for .NET Framework and 2.0 and later.

or for limited barcode type support:

* These components can also encode Unicode characters.

Features

For full details view the product Help file or manual.

Licensing

Each dBarcode.NET component is available as a single PC version, or as a developer/server version which permits use on a server or 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/8/10 with Microsoft .NET Framework 2.0, 3.0, 3.5, 4.0 or later
Server version support Windows Server 2003 or later.
Designed for use with Visual Studio 2005/2008/2010/2012/2013/2015
Supports x32, x64 and IA64.
ASP.NET requires Microsoft IIS and .NET Framework 2.0 or later.

Note: Current versions of the dBarcode.NET components no longer support .NET version 1.0 or 1.1.


Using with Visual Studio

Details and examples of using the components or controls for generating barcodes in C# click here

Details and examples of using the components or controls for generating barcodes in VB click here


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.