.NET barcode component that easily integrates barcode rendering with your .NET application. Written entirely in managed code. Works with .NET 1.1, 2.0, 3.0, 3.5 and 4.0, Mono, Delphi.NET, Crystal Reports, Visual Studio Local Reports (RDLC), SQL Server Reporting Services, Gizmox Visual WebGui and ASP 3.0.
Try it online now! - See our online barcode demo.
using Limilabs.Barcode;
static void Main(string[] args)
{
BaseBarcode barcode = BarcodeFactory.GetBarcode(Symbology.EAN13);
barcode.Number = "123456789012";
barcode.ChecksumAdd = true;
// Render barcode:
Bitmap bitmap = barcode.Render();
// You can also save it to file:
barcode.Save("c:\\barcode.gif", ImageType.Gif);
}
Imports Limilabs.Barcode
Shared Sub Main()
Dim barcode As BaseBarcode
barcode = BarcodeFactory.GetBarcode(Symbology.EAN13)
barcode.Number = "123456789012"
barcode.ChecksumAdd = true
' Render barcode:
Dim bitmap As Bitmap = barcode.Render()
' You can also save it to file:
barcode.Save("c:\barcode.gif", ImageType.Gif)
End Sub
#include "stdafx.h"
#include <atlimage.h>
#import "..\..\Redistributables\Barcode.tlb" named_guids
int _tmain(int argc, _TCHAR* argv[])
{
// Initialize COM.
CoInitialize(NULL);
Barcode::IBarcodeFactoryPtr pIBarcodeFactory;
HRESULT hr = pIBarcodeFactory.CreateInstance(
Barcode::CLSID_BarcodeFactory
);
Barcode::IBaseBarcodePtr pIBarcode =
pIBarcodeFactory->CreateBarcode(Barcode::Symbology_Code39);
// Release BarcodeFactory object.
pIBarcodeFactory = NULL;
// Set some barcode properites.
pIBarcode->FontStyle = Barcode::FontStyleType_Bold;
pIBarcode->ForeColor = RGB(100, 100, 200);
pIBarcode->Number = "123";
pIBarcode->Rotation = Barcode::RotationType_Degrees90;
// Save barcode image to file as PNG.
pIBarcode->Save("c:\\barcode.png", Barcode::ImageType_Png);
// Obtain handle to another memory bitmap.
HBITMAP hBitmap = (HBITMAP)pIBarcode->RenderHbitmap();
// Attach CImage object to this handle.
CImage image;
image.Attach(hBitmap);
// Save Cimage object to file as BMP.
image.Save(L"c:\\barcode.bmp", Gdiplus::ImageFormatBMP);
image.Destroy();
// Release Barcode object.
pIBarcode = NULL;
// Uninitialize COM.
CoUninitialize();
return 0;
}
Dim bf
Dim b
Set bf = CreateObject("Limilabs.Barcode.BarcodeFactory")
'=Code39. Check Symbology enum for other values.
Set b = bf.CreateBarcode(4)
' Set some barcode properites.
'=Bold. Check FontStyleType enum for other values.
b.FontStyle = 1
b.Number = "12345"
'=Degrees90. Check RotationType enum for other values.
b.Rotation = 1
' Save barcode image to file as PNG.
'=Png. Check ImageType enum for other values.
b.Save "c:\vb.png", 2