As a managed .NET library, pqScan Barcode Creator can be used in both C# and VB.NET language. It can run standalone without other component to encode and make barcode images fast and good quality. In addition, it's easy to integrate into any .net programming, such as Console application, .NET Winforms and ASP.NET web sites.
What's more, pqScan Barcode Creator SDK is a multifunctional component, it includes an ASP.NET barcode generating control, a Windows Forms barcode generating control and an API. If you have interest in the barcode generating control, you can see another two barcode creating guide. Here, we will introduce you how to use API to encode and make barcodes in C# and VB.NET.
Encode barcode with 1D type - C Sharp sample
The first guide will show you how to make Linear(1D) barcode in C# code. As we know, pqScan Barcode Creator provides generating Generate Code 128, Generate Code 39, Generate UPC-A, Generate EAN8, Generate EAN13 barcodes. Here we choose Code-128 for example.
using System; using PQScan.BarcodeCreator; namespace BarcodeGeneratorInCSharp { class Program { static void Main(string[] args) { Barcode barcode = newBarcode(); barcode.Data = "www.pqscan.com"; barcode.BarType = BarCodeType.Code128; barcode.Width = 300; barcode.Height = 100; barcode.CreateBarcode("code128-csharp.jpeg"); } } }
Encode barcode with 2D type - Visual Basic sample
The second tutorial shows how to print 2D barcode in VB.NET code. Here we choose creating QR Code for example. As long as QR Code, PDF417, Aztec Code and Data Matrix can be generated using VB.NET, too.
Imports System.IO Imports PQScan.BarcodeCreator Namespace BarcodeGeneratorVB Class Program Private Shared Sub Main(args As String()) Dim barcode As New Barcode() barcode.Data = "www.pqscan.com" barcode.BarType = BarCodeType.QRCode barcode.Width = 200 barcode.Height = 200 barcode.CreateBarcode("qrcode-vb.jpeg") End Sub End Class End Namespace