We use cookies to provide you with the best experience and functionality on our website. By continuing to use the site, you are agreeing to our use of cookies.   

Visual Basic
Barcodes in projects

EnterpriseInfoTo use this functionality you require the Enterprise Edition

Visual Basic

How to add a barcode to a Visual Basic project


You can use ActiveBarcode in Visual Basic like any other control (e.g. like a button). First you have to add the ActiveBarcode control into the development environment.

1. Adding ActiveBarcode to the development environment

Go to the menu "Tools" and select the function "Choose Toolbox items":

Barcode, Visual Basic


A dialog appears. As ActiveBarcode is a COM component first select the tab "COM Components":

Barcode, Visual Basic


A list of the available controls will be displayed. Select "ActiveBarcode" and activate it. Then click OK.

Barcode, Visual Basic


Now ActiveBarcode is added to your development environment.

2. Use ActiveBarcode in your project


Create a new project. Be aware that you select a project type that supports ActiveX controls:

Barcode, Visual Basic


To add the ActiveBarcode Control to a form you select the function "Toolbox" from the "View" menu first. This opens the toolbox. "Toolbox":

Barcode, Visual Basic


Have a look for the ActiveBarcode Control in the toolbox now.

Barcode, Visual Basic


Click on ActiveBarcode there and move it the form you want to place the control. The control will then be placed on this form.

Barcode, Visual Basic


You can change the barcode properties of the barcode control now or later. In this example we change the background color to white:

Barcode, Visual Basic


Now add a "Textbox" to this form, too.

Barcode, Visual Basic


Double click this textbox now to open the source code for the event "Textchange". We will use this event to change the barcodes content every time the textbox changes.

Barcode, Visual Basic


That's it. Now launch this example application:

Barcode, Visual Basic


If you change the content of the textbox in the running application, the barcode will encode this.

Not visual usage of ActiveBarcode:
You also can create ActiveBarcode at run time and use the the control:

In the following example ActiveBarcode is created invisible, then a Code 128 with the encoded content "Example" is generated and saved as image file by using the SaveAsBySize function.

Dim MyObject As Object
MyObject = CreateObject("BARCODE.BarcodeCtrl.1")
MyObject.text = "Example"
MyObject.typename = "Code 128"
MyObject.SaveAsBySize("example.bmp", 400, 100)

This manual was created by Frank Horn

Search this site with Bing:
| Home | Shop | Download | E-Mail | Datenschutz | Imprint | Version 6.2.0 |
Web DesignszBubble
Web design & developement:

Frank HornActiveBarcode Generator App
Web design
Copyright Frank Horn
Lars SchenkActiveBarcode Object
Web- & server component
Command line
Copyright Lars Schenk

All trademarks and product names mentioned are the property of their respective owners.