VB.NET Barcode Generator - Generating Barcodes in VB.NET, VB.NET ASP.NET
This article introduces how to use Barcode for .NET component to generate barcodes in your VB.NET website, VB.NET classes, and VB.NET Windows applications.
VB.NET Barcode Generator Introduction
BarcodeLib Barcode for .NET is the most flexible and powerful VB.NET Bar Code generator.
Download free evaluation version
VB.NET Barcode Generator - Supported Symbologies
- VB.NET Barcode Generates 1D (Linear) Barcode Symbologies
- VB.NET Barcode Generates 2D (Matrix) Barcode Symbologies.
VB.NET Barcode - Project Setup
- Add trial version or production version of BarcodeLib.Barcode.dll to your VB.NET project reference.
VB.NET Barcode in .NET Class
1: Dim barcode As BarcodeLib.Barcode.Linear.Linear
2: barcode = New BarcodeLib.Barcode.Linear.Linear()
3: barcode.Type = BarcodeLib.Barcode.Linear.BarcodeType.CODE39
4: barcode.Data = "123456789"
5: ' other barcode settings.
6:
7: ' save barcode image into your system
8: barcode.drawBarcode("c:/barcode.gif")
The above code is written in Visual VB.NET 2005
- Create a linear barcode object (BarcodeLib.Barcode.Linear.Linear).
- Set barcode type to Code 39
- Set your encoded barcode value
- Draw barcode image into a GIF file
VB.NET Barcode - Generate Barcodes in VB.NET Webstie
- Copy folder barcode from your downloaded Barcode for .NET trial package, to your IIS folder, e.g. C:\Inetpub.
- Create a new virtual directory barcode.
- Restart IIS.
- Test your installation, goto http://YourDomain:port/barcode/linear.aspx?Type=CODE39&Data=12345678
- To create barcode image in your VB.NET website, you can pass the url to IMG tag src value.
For example, <img src="http://YourDomain:port/barcode/linear.aspx?Type=CODE39&Data=12345678" />
VB.NET Barcode - Generates Barcode in Windows Applications
- Add Reference BarcodeLib.Barcode.dll to your project. Do not copy the dll to the bin directory, Visual Studio will do so, during project compilation time.
- In your .NET windows project, right click mouse over Refereces in your Solution Explorer window. Then click menu "Add Reference ...".
- Add BarcodeLib.Barcode.dll to your project.
- Add barcode library to your Visual Studio Toolbox.
- Open Toolbox in Visual Studio. Click menu View, and check submenu Toolbox.
- Right click Toolbox, click menu Choose Items...
- Goto .NET Framework Components tab.
- Check component LinearWinForm, and its namespace is BarcodeLib.Barcode.Linear
- If no component found, click Browse... button and select BarcodeLib.Barcode.dll file.
- Now you can see the component displayed on Toolbox. You can drag LinearWinForm on your form, change barcode setting through properties widnow.
Other Barcode Related Articles