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 J#
Barcodes in projects

EnterpriseInfoTo use this functionality you require the Enterprise Edition

Visual J#

How to add a barcode to a Visual J# project

1

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

Adding ActiveBarcode to the development environment

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

Barcode, Visual J#

2

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

Barcode, Visual J#

3

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

Barcode, Visual J#

4

Now ActiveBarcode is added to your development environment.

Use ActiveBarcode (A simple example)

Create a new project. 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 J#

5

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

Barcode, Visual J#

6

Click on ActiveBarcode there and place it into the form. The control will then be integrated on this form.

Barcode, Visual J#

7

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 J#

8

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

Barcode, Visual J#

9

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 J#

10

That's it. Now launch this example application:

Barcode, Visual J#

11

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 EAN-13 code with the encoded content "123456789012" is generated and saved as image file by using the SaveAsBySize function.

BARCODELib.BarcodeClass ab = new BARCODELib.BarcodeClass();
ab.set_Text("123456789012");
ab.set_TypeName("EAN 13");
ab.SaveAsBySize("c:/example.bmp", 400, 150);
If you have no reference to ActiveBarcode in your application, go to the Solution Explorer and click with the right mouse button on "References", then select "Add Reference -> COM -> ActiveBarcode".

More examples:
// Copy the barcode into the clipboard.
ab.CopyToClipboardBySize(400, 150);

// Display the about box.
ab.AboutBox();

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 3.0.11.543
Web design & developement:
www.frank-horn.com

Copyright
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.