Compatibility & Requirement
- Development Conditions: Visual Studio 2005/2008/2010, .NET Version 2.0 or above, IIS (Microsoft Internet Information Services), C#.NET, or VB. NET
- Supportive Project Kinds: Windows Forms Application, .NET Console Application, .NET Class Library and Windows Services
- Supportive Operating Systems: Windows 2000, Windows XP, Windows Vista & Windows 7
- Least Application Demands: 500MHZ processor, 128MB RAM, 5MB available hard drive space
- Microsoft Windows XP
- Microsoft Visual Studio 2005
- Visual Basic .NET
KeepAutomation Barcode Generator for .NET WinForms is robust and powerful barcode component controller that lets you to integrate barcode generation features into .NET WinForms or other types of .NET projects. The easy-to-use .NET SDK could be managed in .NET with mit Visual Basic .NET sample programming language. This walkthrough is to show you how to get barcodes in .NET WinForms by using VB.NET.
It is easy to create or capture barcodes using KeepAutomation Barcode Generator for .NET WinForms as detailed guide information is provided. Users can get user-defined barcode images by changing image properties, such as width, height, text, etc. And this barcode generator will automatically add checksum digit for required dynamic number barcodes.
How to Generate Barcodes in WinForms Using VB.NET
Mode 1: Drag and Drop Barcode to WinForms Using VB.NET
- Open your Visual Studio and create a Windows Forms VB project.
- Add "KeepAutomation.Barcode.Windows.dll" to the Toolbox of your Visual Studio.
- Drag and drop BarcodeControl to your WinForms project.
- Insert a button to the form, then double click the button to compile the following demo code.
VB Sample code
Dim barcode As KeepAutomation.Barcode.Bean.BarCode = New KeepAutomation.Barcode.Bean.BarCode
barcode.Symbology = KeepAutomation.Barcode.Symbology.Code128Auto
barcode.CodeToEncode = "245741SAD"
barcode.X = 1
barcode.Y = 60
barcode.BottomMargin = 10
barcode.LeftMargin = 10
barcode.RightMargin = 10
barcode.TopMargin = 10
barcode.DisplayText = True
barcode.ChecksumEnabled = True
barcode.DisplayChecksum = True
barcode.Orientation = KeepAutomation.Barcode.Orientation.Degree0
barcode.BarcodeUnit = KeepAutomation.Barcode.BarcodeUnit.Pixel
barcode.DPI = 72
barcode.TextFont = New Font("Arial", 10.0F, FontStyle.Regular)
barcode.ImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg
barcode.generateBarcodeToImageFile("C://barcode-code128-vb.jpeg")
Mode 2: Barcode Generation in WinForms Using VB.NET
- Create a WinForms VB project in your Visual Studio.
- Drag and drop a button from the Toolbox to the form.
- Double click the form and add KeepAutomation.Barcode.Windows.dll to the VB WinForms project reference.
- Use the following VB demo code to generate linear and 2D barcode images.
VB Sample code
Dim barcode As KeepAutomation.Barcode.Bean.BarCode = New KeepAutomation.Barcode.Bean.BarCode
barcode.Symbology = KeepAutomation.Barcode.Symbology.PDF417
barcode.CodeToEncode = "PDF-417"
barcode.PDF417DataMode = KeepAutomation.Barcode.PDF417DataMode.Auto
barcode.X = 2
barcode.Y = 5
barcode.PDF417XtoYRatio = 0.3
barcode.PDF417ColumnCount = 3
barcode.PDF417ColumnCount = 5
barcode.PDF417Truncated = False
barcode.BarCodeWidth = 330
barcode.BarCodeHeight = 70
barcode.BottomMargin = 10
barcode.LeftMargin = 10
barcode.RightMargin = 10
barcode.Orientation = KeepAutomation.Barcode.Orientation.Degree0
barcode.BarcodeUnit = KeepAutomation.Barcode.BarcodeUnit.Pixel
barcode.DPI = 72
barcode.ImageFormat = System.Drawing.Imaging.ImageFormat.Png
barcode.generateBarcodeToImageFile("C://barcode-pdf417-vb.png")