Install .NET Barcode Generator Components to .NET Projects
.NET Barcode Generator Components are built on C#.NET 2005.
They are compatible with Microsoft C#.NET, VB.NET, Borland Delphi for Microsoft .NET,
Visual Studio .NET Framework 2.0 or later version.
Install
- Download the trial package and unzip
- Copy OnBarcode.Barcode.WinForms.dll or OnBarcode.Barcode.ASPNET.dll to your .NET project folder.
Do not copy dll to .NET bin directory, .NET build tools will do it for you.
- Add OnBarcode.Barcode.WinForms.dll or OnBarcode.Barcode.ASPNET.dll to .NET project reference
Add ASP.NET Web Form Control to ASP.NET Visual Studio Toolbox
-
Right click .NET Visual Studio Toolbox, select menu Choose Items...
-
In "Choose Toolbox Items" form, click button "Browse...", and select dll OnBarcode.Barcode.ASPNET.dll
- After selection, you will find four items under "Components" section: LinearWebForm, DataMatrixWebForm, PDF417WebForm, and QRCodeWebForm.
Add .NET Windows Form Control to .NET Visual Studio Toolbox
-
Right click .NET Visual Studio Toolbox, select menu Choose Items...
-
In "Choose Toolbox Items" form, click button "Browse...", and select dll OnBarcode.Barcode.WinForms.dll
- After selection, you will find four items under "Components" section: LinearWinForm, DataMatrixWinForm, PDF417WinForm, and QRCodeWinForm.
How to Generate Barcodes in C#.NET class?
Generating barcodes in C# Class example
More Barcode Generation Tutorial for C#
More C# source code examples for common barcode types
// Create a linear object and set barcode symbology type to Code-39
Linear barcode = new Linear();
barcode.Type = BarcodeType.CODE39;
// Set barcode value
barcode.Data = "CODE39";
// Set barcode bar width (X module) and bar height (Y module)
barcode.X = 1;
barcode.Y = 60;
// Generate barcode and encode barcode to gif format
barcode.Format = ImageFormat.Gif;
barcode.drawBarcode("c#-barcode.gif");
// Print barcode to C# Bitmap object
Bitmap barcodeInBitmap = barcode.drawBarcode();
Other C# methods to generate barcodes & output to C# objects
public void drawBarcode(Graphics graphics);
public void drawBarcode(string filename);
public Bitmap drawBarcode();
public void drawBarcode(Stream fileStream);
More Barcode Generation Tutorial for C#
More C# source code examples for common barcode types
| Data Matrix in C# | PDF-417 in C# | QR-Code in C# | |
| Code-39 in C# | Code-128 in C# | GS1-128 in C# | |
| EAN-8 in C# | EAN-13 in C# | UPC-A in C# | UPC-E in C# |
How to Generate Barcodes in VB.NET class?
Generating barcodes in VB.NET Class example
More Barcode Generation Tutorial for VB.NET
// Create linear barcode object and set barcode type Dim barcode As OnBarcode.Barcode.Linear barcode = New OnBarcode.Barcode.Linear() barcode.Type = OnBarcode.Barcode.BarcodeType.CODE39 // Set barcode value to encode barcode.Data = "CODE39" // Set barcode bar width (X module) and bar height (Y module) barcode.X = 1 barcode.Y = 60 // Generate barcode and encode barcode to png format barcode.Format = ImageFormat.Png barcode.drawBarcode("vbnet-barcode.png") // Print barcode to vb.net Bitmap object Dim barcodeInBitmap As Bitmap barcodeInBitmap = barcode.drawBarcode();Other VB.NET methods to generate barcodes & output to VB.NET objects
Public Sub drawBarcode(ByRef graphics As Graphics) Public Sub drawBarcode(ByVal filename As String) Public Function drawBarcode() As Bitmap Public Sub drawBarcode(ByRef fileStream As Stream)
More Barcode Generation Tutorial for VB.NET
How to generate barcode image in html or aspx pages?
- Under demo package, copy barcode folder and its contents to your IIS, and create a new virtual directory.
- Restart IIS, navigate to http://YourDomain:Port/barcode/linear.aspx?DATA=0123456789&TYPE=4
- To generate barcode image in html or aspx pages, you can insert a image tag (img) into your page.
For example, <img src="http://YourDomain:Port/barcode/linear.aspx?DATA=0123456789&TYPE=4" />
.NET Barcode Generator for Reporting Service 2005 and 2008
.NET Barcode Generator Supporting Barcode Symbology Types
(Click to view each barcode type property settings)
|
|
