ActiveBarcode for...

135
ActiveBarcode for developers http://www.activebarcode.com/

Transcript of ActiveBarcode for...

ActiveBarcode for developers

http://www.activebarcode.com/

Content

About this manual.................................................................................................................1

Setup ActiveBarcode.............................................................................................................2

Visual Studio 2012 Barcodes in projects.................................................................................3

Visual Basic Barcodes in projects...........................................................................................8

Visual C# and C++ Barcodes in projects...............................................................................13

Delphi 2005-XE2 Barcodes in projects...................................................................................19

Delphi 4-7 Barcodes in projects............................................................................................24

VisualBasicScript Barcodes in projects..................................................................................28

JavaScript Barcodes in projects............................................................................................29

Lotus Domino, LotusScript Barcodes in projects....................................................................30

Access 2013 Barcodes in reports..........................................................................................31

Access 2013 Barcodes in Forms............................................................................................36

Access 2010 Barcodes in reports..........................................................................................40

Access 2010 Barcodes in Forms............................................................................................45

Access 2007 Barcodes in reports..........................................................................................49

Access 2007 Barcodes in Forms............................................................................................54

Access 2000, XP, 2003 Barcodes in reports...........................................................................57

Access 2000, XP, 2003 Barcodes in forms.............................................................................61

ActiveBarcode Control (OCX)................................................................................................65

Property Dialog: General......................................................................................................66

Property Dialog: Fonts.........................................................................................................68

Property Dialog: Colors........................................................................................................69

Property Dialog: Layout.......................................................................................................70

ActiveBarcode Commandline Tool.........................................................................................72

Barcode types.....................................................................................................................75

OCX: Properties...................................................................................................................79

i

Content

OCX: Methods......................................................................................................................81

OCX: Events........................................................................................................................83

Property: Text.....................................................................................................................84

Property: ShowText.............................................................................................................85

Property: Type....................................................................................................................86

Property: Rotate..................................................................................................................92

Property: Alignment............................................................................................................93

Property: TypeName............................................................................................................94

Property: IsValid..................................................................................................................95

Property: IsSizeOk...............................................................................................................96

Property: Checksum.............................................................................................................97

Property: Picture.................................................................................................................98

Property: BackColor.............................................................................................................99

Property: ForeColor...........................................................................................................100

Property: Font...................................................................................................................101

Property: Version...............................................................................................................102

Property: BorderHeight......................................................................................................103

Property: BorderWidth.......................................................................................................104

Property: MaxBorderHeight................................................................................................105

Property: MaxBorderWidth.................................................................................................106

Property: NotchHeightInPercent.........................................................................................107

Property: PrintFix..............................................................................................................108

Property: AutoType............................................................................................................109

Method: CopyToClipboard..................................................................................................110

Method: CopyToClipboardBySize........................................................................................111

Method: CreatePictureBySize.............................................................................................112

ii

Content

Method: SaveAs.................................................................................................................113

Method: SaveAsBySize.......................................................................................................114

Method: SaveAsBySizeExtended.........................................................................................115

ActiveBarcode Control: Image file options...........................................................................117

Method: SetDemoText........................................................................................................119

Method: AboutBox.............................................................................................................120

Method: BinaryWriteAsPNGBySize......................................................................................121

Method: BinaryWriteAsPNG................................................................................................122

Method: SaveAsPNG..........................................................................................................123

Method: SaveAsPNGBySize.................................................................................................124

Event: TypeChange............................................................................................................125

Event: TextChange.............................................................................................................126

Event: ShowTextChange.....................................................................................................127

Event: AutoTypeChange.....................................................................................................128

Event: PrintFixChange........................................................................................................129

Information for developers.................................................................................................130

iii

About this manual

This present documentation is a shortened version of the extensive online documentation. This documentouter finally concentrates on the topic

ActiveBarcode for developers

You find the complete documentation at ours homepage http://www.activebarcode.com/. There you find

- detailed and current information- examples for download- extensive step-by-step instructions- example videos- a detailed FAQ- and much more

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

ActiveBarcode Software (c) Lars Schenk & Frank HornThis document (c) Frank Horn

Document Version 2.1.287

About this manual 1

Setup ActiveBarcode

How to setup ActiveBarcode to your machine:

If you already have an ActiveBarcode installation on your system (e.g. if you tried the trial and have nowpurchased the full version), please uninstall before installing. You need administrator's rights for theinstallation. If you don't have them, ask your administrator to install the software.

Now launch the setup file ActiveBarcode5.60.exe or when setting up the trial it's the fileActiveBarcode-Trial5.60.exe. If you have downloaded a ZIP archive, first extract the file from the archive.The setup application will then be launched. The setup, the control and the Application is digital signed by'Lars Schenk'.

Follow the instructions of this setup application. You even can cancel the setup process using the "Cancel"button. After the setup is complete the ActiveBarcode Control is available now in your system and inaddition to this you can now start the ActiveBarcode Application form your Startmenu -> Programs.

Please consider that the ActiveBarcode Control is more flexible and more powerful than theActiveBarcode Application! You can find instructions of how to use ActiveBarcode Control with diffentsoftware here: Examples

Setup ActiveBarcode 2

Visual Studio 2012

Barcodes in projects

To use this functionality you require the Enterprise Edition

How to add a barcode to a Visual Studio 2012 project

You can use the ActiveBarcode control in Visual Studio 2012 like you do with any other control, e.g. abutton. First you have to add the ActiveBarcode control into the development environment.

Adding ActiveBarcode to the development environmentGo to the menu "Tools" and select the function "Choose Toolbox items":

A dialog appears. As ActiveBarcode is a COM component first select the tab "COM Components". A list ofthe available controls will be displayed. Select "ActiveBarcode" and activate it.

Then click OK. Now ActiveBarcode is added to your development environment.

Visual Studio 2012 Barcodes in projects 3

Use ActiveBarcode (A simple example)Create a new project. To add the ActiveBarcode Control to a form you select the function "Toolbox" fromthe "View" menu first. This opens the toolbox. "Toolbox". Have a look for the ActiveBarcode Control in thetoolbox now.

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

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

Visual Studio 2012 Barcodes in projects 4

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

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

Visual Studio 2012 Barcodes in projects 5

This code example is for Visual Basic. With Visual C# you use the following code for the assignment ogthe text property:

axBarcode1.Text = textBox1.Text;

That's it. Now launch this example application:

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.

Visual Studio 2012 Barcodes in projects 6

Visual Basic:

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

Visual C#:

BARCODELib.Barcode ab = new BARCODELib.Barcode();ab.Text = "123456789012";ab.TypeName = "EAN 13";ab.SaveAsBySize("example.bmp", 400, 150);

Visual Studio 2012 Barcodes in projects 7

Visual Basic

Barcodes in projects

To use this functionality you require the Enterprise Edition

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 addthe ActiveBarcode control into the development environment.

Adding ActiveBarcode to the development environmentGo to the menu "Tools" and select the function "Choose Toolbox items":

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

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

Visual Basic Barcodes in projects 8

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" fromthe "View" menu first. This opens the toolbox. "Toolbox":

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

Visual Basic Barcodes in projects 9

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

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

Visual Basic Barcodes in projects 10

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

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

That's it. Now launch this example application:

Visual Basic Barcodes in projects 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 Code 128 with the encoded content"Example" is generated and saved as image file by using the SaveAsBySize function.

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

Visual Basic Barcodes in projects 12

Visual C# and C++

Barcodes in projects

To use this functionality you require the Enterprise Edition

How to add a barcode to a Visual C# or C++ project

You can use ActiveBarcode in Visual C# and C++ like any other control (e.g. like a button). First you haveto add the ActiveBarcode control into the development environment.

Adding ActiveBarcode to the development environmentIn this example, Visual C# is used. The procedure in Visual C++ is nearly identical.

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

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

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

Visual C# and C++ Barcodes in projects 13

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" fromthe "View" menu first. This opens the toolbox. "Toolbox":

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

Visual C# and C++ Barcodes in projects 14

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

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

Visual C# and C++ Barcodes in projects 15

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

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

Visual C# and C++ Barcodes in projects 16

That's it. Now launch this example application:

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.Barcode ab = new BARCODELib.Barcode();ab.Text = "123456789012";ab.TypeName = "EAN 13";ab.SaveAsBySize("example.bmp", 400, 150);

If you have no reference to ActiveBarcode in your application, go to the Solution Explorer and click withthe right mouse button on "References", then select "Add Reference -> COM -> ActiveBarcode".

Visual C# and C++ Barcodes in projects 17

More examples:

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

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

Visual C# and C++ Barcodes in projects 18

Delphi 2005-XE2

Barcodes in projects

To use this functionality you require the Enterprise Edition

How to use barcodes in Delphi

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

Add ActiveBarcode to the Delphi development environment(The is also a description for older Delphi versions (4-7) available)

Select a package in which you would like to take up the Control or create a new package ("File" - "New" -"Package Delphi for Win32 "):

Save this package under an own name with the "Save as" function. For example as"ActiveBarcodePackage".

Now import the ActiveBarcode Control in the package. Launch the function "Component import" from themenu "Component".

The "Component dialog" appears:

Delphi 2005-XE2 Barcodes in projects 19

Select "ActiveX control" and click "Continue". Now a list of the available controls will be shown:

Select "ActiveBarcode" from that list and click "Continue". A page for component setup will be shown:

You don't need to change something here. Click "Continue". A page for "Install" appears.

Select "Add unit to the project .." here and click on "Finish". Now ActiveBarcode is added as a componentto the package. Now you must compile the package. Select the function " ActiveBarcodePackage create"from the menu "Project":

Delphi 2005-XE2 Barcodes in projects 20

Use ActiveBarcode (Example)

Create a new project: "File" - "New" - "Form application VCL". To place ActiveBarcode now onto a formyou select the ActiveBarcode Control from the tool palette. You'll find this under "ActiveX" as a"TBarcode" component:

Select TBarcode and place the component on the form. In the object inspector you can customize theproperties of the component. E.g. set the background color on white.

For this example add one more TEdit to the form. Now you form might look as follows:

Delphi 2005-XE2 Barcodes in projects 21

Now we "link" the edit field directly with the control. Open the source code for the "textchange" event bydouble clicking the edit field. This event always is called, if the contents of the edit field are changed.Ideally for our example. We give this update immediately to the control.

That's it. Now launch the program:

Change the content of the edit field to change the barcode.

Programming:Setting properties is very simple. Some examples:

Barcode1.Text := '123456789012';Barcode1.BackColor := clWhite;Barcode1.ForeColor := clBlack;

Delphi 2005-XE2 Barcodes in projects 22

Using the Picture Property:Copy the barcode to a image object:

Image1.Picture.Bitmap.Height := Barcode1.Height;Image1.Picture.Bitmap.Width := Barcode1.Width;Barcode1.Picture.PictureAdapter := nil; // delphi workaroundImage1.Picture.Bitmap.Canvas.Draw(0,0,Barcode1.Picture.graphic);

Clipboard:Copy the current barcode to the clipboard. Metafile (WMF):

Barcode1.CopyToClipboard;

Bitmap:

Image1.Picture.Bitmap.Height := Barcode1.Height;Image1.Picture.Bitmap.Width := Barcode1.Width;Barcode1.Picture.PictureAdapter := nil; // delphi workaroundImage1.Picture.Bitmap.Canvas.Draw(0,0,Barcode1.Picture.graphic);Clipboard.Assign(Image1.Picture.Bitmap);

Delphi 2005-XE2 Barcodes in projects 23

Delphi 4-7

Barcodes in projects

To use this functionality you require the Enterprise Edition

How to use barcodes in Delphi (Version 4.x to 7.x)

You can use ActiveBarcode in Delphi like any other control (e.g. like a button). First you have to add theActiveBarcode control into the Delphi development environment. Go to the menu "Component" and selectthe function "Import ActiveX control":

A dialog shows up on your screen. Select "ActiveBarcode" from that list of controls. Then click the"Install..." button:

Delphi 4-7 Barcodes in projects 24

Follow the instructions showing on your screen.

Now the ActiveBarcode control is added to your Delphi development environment. The barcode icons ofActiveBarcode will appear in the tool bar located in "ActiveX":

Now select this icon and place it anywhere in a form. The barcode control will be placed in that form. Thiswill be a standard barcode. You can change this and all other properties of that barcode control in the"Object Inspector".

Delphi 4-7 Barcodes in projects 25

For example you can select any barcode that is supported by ActiveBarcode: For example: Code 25Interleaved, Code 39, Code 128, Data Matrix, EAN-8, EAN-13, EAN-18, EAN 128, GS1-128, GS1-DataMatrix, GTIN-8, GTIN-12, GTIN-13, Bookland, ITF-14, PDF417, QR Code, SCC-14, SSCC-18, UCC-128, UPC-A,UPC-E.

Programming:To set the properties is very simple. Some examples:

Barcode1.Text := '123456789012';Barcode1.BackColor := clWhite;Barcode1.ForeColor := clBlack;

Using the Picture Property:How to copy the barcode image into a image object:

Image1.Picture.Bitmap.Height := Barcode1.Height;Image1.Picture.Bitmap.Width := Barcode1.Width;Barcode1.Picture.PictureAdapter := nil; // delphi workaroundImage1.Picture.Bitmap.Canvas.Draw(0,0,Barcode1.Picture.graphic);

Clipboard:How to copy a barcode into the Windows clipboard. First as meta file (WMF):

Barcode1.CopyToClipboard;

And now as bitmap image:

Image1.Picture.Bitmap.Height := Barcode1.Height;Image1.Picture.Bitmap.Width := Barcode1.Width;Barcode1.Picture.PictureAdapter := nil; // delphi workaroundImage1.Picture.Bitmap.Canvas.Draw(0,0,Barcode1.Picture.graphic);

Delphi 4-7 Barcodes in projects 26

Clipboard.Assign(Image1.Picture.Bitmap);

Delphi 4-7 Barcodes in projects 27

VisualBasicScript

Barcodes in projects

ActiveBarcode in VisualBasicScript (Windows Scritping Host)

You can use ActiveBarcode with VisualBasic-Script (VBS, Windows Scripting Host) to create barcodes inscripts automatically. Here we show you how simple is it to use ActiveBarcode in VBS.

First make the ActiveBarcode control available in your script:

Dim barcodeSet barcode = WScript.CreateObject("BARCODE.BarcodeCtrl.1")

Now you can use the variable 'barcode' to access the control. Use the Properties of the control to createthe barcode you want:

barcode.Typename = "Code128"barcode.Text = "123456789012"

Then use the 'SaveAs' method to save the barcode as an image file:

barcode.SaveAs("examplebarcode.png")

To learn more about this, please have a look at the VisualBasic-Script application 'barcodeimage.wsf' thatis included in the ActiveBarcode package. You can use this source code for learning purposes or use it asa start for your own scripts.

VisualBasicScript Barcodes in projects 28

JavaScript

Barcodes in projects

How to use the barcode control with JavaScript (Windows)

You can create the ActiveBarcode Control with Java script (e.g., with the Internet Explorer) at run time anduse is non visual:

// Create the control:ab = new ActiveXObject("BARCODE.BarcodeCtrl.1");

// Set the barcode type and content:ab.text = "Example";ab.typename = "Code 128";

// Save the barcode as image file:ab.SaveAsBySize("example.bmp", 400, 100);

// Example: Show the controls about box:ab.aboutbox();

JavaScript Barcodes in projects 29

Lotus Domino, LotusScript

Barcodes in projects

Using the barcode control in a LotusScript agent

This is a script example to run under IBM's Lotus Domino as a LotusScript agent:

Option PublicOption Declare

Sub Initialize() Dim MyObject As variant Set MyObject = CreateObject("BARCODE.BarcodeCtrl.1") MyObject.text = "Example" MyObject.typename = "Code 128" MyObject.SaveAsBySize "c:\example.bmp", 400, 100End Sub

Lotus Domino, LotusScript Barcodes in projects 30

Access 2013

Barcodes in reports

To use this functionality you require the Enterprise Edition

Barcodes in an Access 2013 database report

Here we show you how to add a barcode into a Access database report and bind it to a data field. Firstlaunch Access and create a new database or open an already existing database in what you want to add abarcode. A simple database could look like this:

Next create a new report.

Now add the ActiveBarcode control to the report. You must be in "Design Mode" to do this.

Access 2013 Barcodes in reports 31

Select the "Design" tab. Click on the button "Insert ActiveX control" from the range of "Controls".

A dialog will show up:

Select "ActiveBarcode" here and click OK. Now the barcode object will be placed in your report. This willbe a standard barcode of EAN-128 type. This is the default type.

Access 2013 Barcodes in reports 32

Now you can modify this barcode. You can change the type, text, colors etc. For this click inside thebarcode with the right mouse button. A pop up menu will open.

Select "ActiveBarcode-Object" and then "Properties...". The property dialog of ActiveBarcode will open.Here you can modify the barcode as you like. For example you can change the type to any barcode typesupported by ActiveBarcode: For example: Code 25 Interleaved, Code 39, Code 128, Data Matrix, EAN-8,EAN-13, EAN-18, EAN 128, GS1-128, GS1-Data Matrix, GTIN-8, GTIN-12, GTIN-13, Bookland, ITF-14,PDF417, QR Code, SCC-14, SSCC-18, UCC-128, UPC-A, UPC-E.

Now place and resize the barcode element for your needs.

Next we bind the controls text property (the barcodes content) to the data field "Code" of the database.Select the "Design" tab. Click on the button "Property sheet" from the range of "Tools".

Have a look for the entry "Control Source" and change it to "Code". This is the data binding:

Access 2013 Barcodes in reports 33

Now close the design mode and switch to report view:

Watch the result:

Access 2013 Barcodes in reports 34

The barcode control is bound to the data base field and shows the code of the current data set asEAN-128 barcode.

One last hint: A report is designed in a lower resolution that it is using while printing. So it may berequired that you create the barcode control with a much bigger font size than you would normally use.Otherwise the text line under the barcode may be very very small in your print.

Access 2013 Barcodes in reports 35

Access 2013

Barcodes in Forms

To use this functionality you require the Enterprise Edition

Barcodes in an Access 2013 database formular

Here we show you how to add a barcode into a Access database and bind it to a data field. First launchAccess and create a new database or open an already existing database in what you want to add abarcode. A simple database could look like this:

Next create a new form. This is easy and we do not explain this functionality of Access further. If you havequestions about this, please have a look into the Access Online Help

Now add the ActiveBarcode control to the form. You must be in "Design Mode" to do this.

Select the "Developer tab". Click on the button "Insert ActiveX control" from the range of "Controls".

Access 2013 Barcodes in Forms 36

A dialog will appear. Select "ActiveBarcode" here and click OK. Now the barcode object will be placed inyour form. This will be a standard barcode of EAN-128 type. This is the default type.

Now you can modify this barcode. You can change the type, text, colors etc. For this click inside thebarcode with the right mouse button. A pop up menu will open. Select "ActiveBarcode-Object" and then"Properties...". The property dialog of ActiveBarcode will open. Here you can modify the barcode as youlike. For example you can change the type to any barcode type supported by ActiveBarcode: Forexample: Code 25 Interleaved, Code 39, Code 128, Data Matrix, EAN-8, EAN-13, EAN-18, EAN 128,GS1-128, GS1-Data Matrix, GTIN-8, GTIN-12, GTIN-13, Bookland, ITF-14, PDF417, QR Code, SCC-14,SSCC-18, UCC-128, UPC-A, UPC-E.

Next we bind the controls text property (the barcodes content) to the data field "Productnumber" of thedatabase.

Select the "Developer tab". Click on the button "Property page" from the range of "Tools".

Access 2013 Barcodes in Forms 37

Have a look for the entry "Control Source" and change it to "Productnumber". This is the data binding:

Now close the design mode of the form and watch the result by simple opening the form:

The barcode control is bound to the data base field and shows the product number of the current data setas EAN-128 barcode.

Embedding and binding an ActiveBarcode control into reports is very similar.

One last hint: A report is designed in a lower resolution that it is using while printing. So it is required thatyou create the barcode control with a much bigger font size than you would normally use. Otherwise thetext line under the barcode may be very very small in your print.

Access 2013 Barcodes in Forms 38

Access 2013 Barcodes in Forms 39

Access 2010

Barcodes in reports

To use this functionality you require the Enterprise Edition

Barcodes in an Access 2010 database report

Here we show you how to add a barcode into a Access database report and bind it to a data field. Firstlaunch Access and create a new database or open an already existing database in what you want to add abarcode. A simple database could look like this:

Next create a new report.

Now add the ActiveBarcode control to the report. You must be in "Design Mode" to do this.

Select the "Design" tab. Click on the button "Insert ActiveX control" from the range of "Controls".

Access 2010 Barcodes in reports 40

A dialog will show up:

Select "ActiveBarcode" here and click OK. Now the barcode object will be placed in your report. This willbe a standard barcode of EAN-128 type. This is the default type.

Now you can modify this barcode. You can change the type, text, colors etc. For this click inside the

Access 2010 Barcodes in reports 41

barcode with the right mouse button. A pop up menu will open.

Select "ActiveBarcode-Object" and then "Properties...". The property dialog of ActiveBarcode will open.Here you can modify the barcode as you like. For example you can change the type to any barcode typesupported by ActiveBarcode: For example: Code 25 Interleaved, Code 39, Code 128, Data Matrix, EAN-8,EAN-13, EAN-18, EAN 128, GS1-128, GS1-Data Matrix, GTIN-8, GTIN-12, GTIN-13, Bookland, ITF-14,PDF417, QR Code, SCC-14, SSCC-18, UCC-128, UPC-A, UPC-E.

Now place and resize the barcode element for your needs.

Next we bind the controls text property (the barcodes content) to the data field "Code" of the database.Select the "Design" tab. Click on the button "Property sheet" from the range of "Tools".

Have a look for the entry "Control Source" and change it to "Code". This is the data binding:

Access 2010 Barcodes in reports 42

Now close the design mode and switch to report view:

Watch the result:

The barcode control is bound to the data base field and shows the code of the current data set asEAN-128 barcode.

One last hint: A report is designed in a lower resolution that it is using while printing. So it may berequired that you create the barcode control with a much bigger font size than you would normally use.Otherwise the text line under the barcode may be very very small in your print.

Access 2010 Barcodes in reports 43

Access 2010 Barcodes in reports 44

Access 2010

Barcodes in Forms

To use this functionality you require the Enterprise Edition

Barcodes in an Access 2010 database formular

Here we show you how to add a barcode into a Access database and bind it to a data field. First launchAccess and create a new database or open an already existing database in what you want to add abarcode. A simple database could look like this:

Next create a new form. This is easy and we do not explain this functionality of Access further. If you havequestions about this, please have a look into the Access Online Help

Now add the ActiveBarcode control to the form. You must be in "Design Mode" to do this.

Select the "Developer tab". Click on the button "Insert ActiveX control" from the range of "Controls".

Access 2010 Barcodes in Forms 45

A dialog will appear. Select "ActiveBarcode" here and click OK. Now the barcode object will be placed inyour form. This will be a standard barcode of EAN-128 type. This is the default type.

Now you can modify this barcode. You can change the type, text, colors etc. For this click inside thebarcode with the right mouse button. A pop up menu will open. Select "ActiveBarcode-Object" and then"Properties...". The property dialog of ActiveBarcode will open. Here you can modify the barcode as youlike. For example you can change the type to any barcode type supported by ActiveBarcode: Forexample: Code 25 Interleaved, Code 39, Code 128, Data Matrix, EAN-8, EAN-13, EAN-18, EAN 128,GS1-128, GS1-Data Matrix, GTIN-8, GTIN-12, GTIN-13, Bookland, ITF-14, PDF417, QR Code, SCC-14,SSCC-18, UCC-128, UPC-A, UPC-E.

Next we bind the controls text property (the barcodes content) to the data field "Productnumber" of thedatabase.

Select the "Developer tab". Click on the button "Property page" from the range of "Tools".

Access 2010 Barcodes in Forms 46

Have a look for the entry "Control Source" and change it to "Productnumber". This is the data binding:

Now close the design mode of the form and watch the result by simple opening the form:

The barcode control is bound to the data base field and shows the product number of the current data setas EAN-128 barcode.

Embedding and binding an ActiveBarcode control into reports is very similar.

Access 2010 Barcodes in Forms 47

One last hint: A report is designed in a lower resolution that it is using while printing. So it is required thatyou create the barcode control with a much bigger font size than you would normally use. Otherwise thetext line under the barcode may be very very small in your print.

Access 2010 Barcodes in Forms 48

Access 2007

Barcodes in reports

To use this functionality you require the Enterprise Edition

Barcodes in an Access 2007 database report

Here we show you how to add a barcode into a Access database report and bind it to a data field. Firstlaunch Access and create a new database or open an already existing database in what you want to add abarcode. A simple database could look like this:

Next create a new report.

Now add the ActiveBarcode control to the report. You must be in "Design Mode" to do this.

Select the "Design" tab. Click on the button "Insert ActiveX control" from the range of "Controls".

Access 2007 Barcodes in reports 49

A dialog will show up:

Select "ActiveBarcode" here and click OK. Now the barcode object will be placed in your report. This willbe a standard barcode of EAN-128 type. This is the default type.

Now you can modify this barcode. You can change the type, text, colors etc. For this click inside thebarcode with the right mouse button. A pop up menu will open.

Access 2007 Barcodes in reports 50

Select "ActiveBarcode-Object" and then "Properties...". The property dialog of ActiveBarcode will open.Here you can modify the barcode as you like. For example you can change the type to any barcode typesupported by ActiveBarcode: For example: Code 25 Interleaved, Code 39, Code 128, Data Matrix, EAN-8,EAN-13, EAN-18, EAN 128, GS1-128, GS1-Data Matrix, GTIN-8, GTIN-12, GTIN-13, Bookland, ITF-14,PDF417, QR Code, SCC-14, SSCC-18, UCC-128, UPC-A, UPC-E.

Now place and resize the barcode element for your needs.

Next we bind the controls text property (the barcodes content) to the data field "Code" of the database.Select the "Design" tab. Click on the button "Property sheet" from the range of "Tools".

Have a look for the entry "Control Source" and change it to "Code". This is the data binding:

Access 2007 Barcodes in reports 51

Now close the design mode and switch to report view:

Watch the result:

The barcode control is bound to the data base field and shows the code of the current data set asEAN-128 barcode.

Access 2007 Barcodes in reports 52

One last hint: A report is designed in a lower resolution that it is using while printing. So it may berequired that you create the barcode control with a much bigger font size than you would normally use.Otherwise the text line under the barcode may be very very small in your print.

Access 2007 Barcodes in reports 53

Access 2007

Barcodes in Forms

To use this functionality you require the Enterprise Edition

Barcodes in an Access 2007 database formular

Here we show you how to add a barcode into a Access database and bind it to a data field. First launchAccess and create a new database or open an already existing database in what you want to add abarcode. A simple database could look like this:

Next create a new form. This is easy and we do not explain this functionality of Access further. If you havequestions about this, please have a look into the Access Online Help

Now add the ActiveBarcode control to the form. You must be in "Design Mode" to do this. Select the"Developer tab". Click on the button "Insert ActiveX control" from the range of "Controls".

The following dialog will appear:

Access 2007 Barcodes in Forms 54

Select "ActiveBarcode" here and click OK. Now the barcode object will be placed in your form. This will bea standard barcode of EAN-128 type. This is the default type. Now you can modify this barcode. You canchange the type, text, colors etc. For this click inside the barcode with the right mouse button. A pop upmenu will open. Select "ActiveBarcode-Object" and then "Properties...". The property dialog ofActiveBarcode will open. Here you can modify the barcode as you like. For example you can change thetype to any barcode type supported by ActiveBarcode: For example: Code 25 Interleaved, Code 39, Code128, Data Matrix, EAN-8, EAN-13, EAN-18, EAN 128, GS1-128, GS1-Data Matrix, GTIN-8, GTIN-12, GTIN-13,Bookland, ITF-14, PDF417, QR Code, SCC-14, SSCC-18, UCC-128, UPC-A, UPC-E.

Next we bind the controls text property (the barcodes content) to the data field "Productnumber" of thedatabase.

Select the "Developer tab". Click on the button "Property sheet" from the range of "Tools".

Have a look for the entry "Control Source" and change it to "Productnumber". This is the data binding:

Access 2007 Barcodes in Forms 55

Now close the design mode of the form and watch the result by simple opening the form:

The barcode control is bound to the data base field and shows the product number of the current data setas EAN-128 barcode.

Embedding and binding an ActiveBarcode control into reports is very similar.

One last hint: A report is designed in a lower resolution that it is using while printing. So it is required thatyou create the barcode control with a much bigger font size than you would normally use. Otherwise thetext line under the barcode may be very very small in your print.

Access 2007 Barcodes in Forms 56

Access 2000, XP, 2003

Barcodes in reports

To use this functionality you require the Enterprise Edition

Barcodes in an Access 2000, XP, 2003 database report

Here we show you how to add a barcode into a Access database report and bind it to a data field. Firstlaunch Access and create a new database or open an already existing database in what you want to add abarcode. A simple database could look like this:

Next create a new report.

Now add the ActiveBarcode control to the report. You must be in "Design Mode" to do this. Go to themenu "Insert" and select "ActiveX control":

A dialog will show up:

Access 2000, XP, 2003 Barcodes in reports 57

Select "ActiveBarcode" here and click OK. Now the barcode object will be placed in your report. This willbe a standard barcode of EAN-128 type. This is the default type.

Now you can modify this barcode. You can change the type, text, colors etc. For this click inside thebarcode with the right mouse button. A pop up menu will open.

Select "ActiveBarcode-Object" and then "Properties...". The property dialog of ActiveBarcode will open.Here you can modify the barcode as you like. For example you can change the type to any barcode typesupported by ActiveBarcode: For example: Code 25 Interleaved, Code 39, Code 128, Data Matrix, EAN-8,EAN-13, EAN-18, EAN 128, GS1-128, GS1-Data Matrix, GTIN-8, GTIN-12, GTIN-13, Bookland, ITF-14,PDF417, QR Code, SCC-14, SSCC-18, UCC-128, UPC-A, UPC-E.

Now place and resize the barcode element for your needs.

Access 2000, XP, 2003 Barcodes in reports 58

Next we bind the controls text property (the barcodes content) to the data field "Code" of the database.Go to the menu "View" and select "Properties":

Have a look for the entry "Control Source" and change it to "Code". This is the data binding:

Now close the design mode, switch to report view and watch the result:

The barcode control is bound to the data base field and shows the code of the current data set asEAN-128 barcode.

Access 2000, XP, 2003 Barcodes in reports 59

One last hint: A report is designed in a lower resolution that it is using while printing. So it may berequired that you create the barcode control with a much bigger font size than you would normally use.Otherwise the text line under the barcode may be very very small in your print.

Access 2000, XP, 2003 Barcodes in reports 60

Access 2000, XP, 2003

Barcodes in forms

To use this functionality you require the Enterprise Edition

Barcodes in an Access 2000, XP, 2003 database, formular or

report

Here we show you how to add a barcode into a Access database and bind it to a data field. First launchAccess and create a new database or open an already existing database in what you want to add abarcode. A simple database could look like this:

Fill the database with some data using the table. See this example:

Next create a new form. This is easy and we do not explain this functionality of Access further. If you havequestions about this, please have a look into the Access Online Help

Now add the ActiveBarcode control to the form. Goto to the menu and select from the the menu "Insert"the function "ActiveX Control...".

Access 2000, XP, 2003 Barcodes in forms 61

The following dialog will appear:

Select "ActiveBarcode" here and click OK. Now the barcode object will be placed in your form. This will bea standard barcode of EAN-128 type. This is the default type. Now you can modify this barcode. You canchange the type, text, colors etc. For this click inside the barcode with the right mouse button. A pop upmenu will open:

Select "ActiveBarcode-Object" and then "Properties...". The property dialog of ActiveBarcode will open.

Access 2000, XP, 2003 Barcodes in forms 62

Here you can modify the barcode as you like. For example you can change the type to any barcode typesupported by ActiveBarcode: For example: Code 25 Interleaved, Code 39, Code 128, Data Matrix, EAN-8,EAN-13, EAN-18, EAN 128, GS1-128, GS1-Data Matrix, GTIN-8, GTIN-12, GTIN-13, Bookland, ITF-14,PDF417, QR Code, SCC-14, SSCC-18, UCC-128, UPC-A, UPC-E.

In this example we use the EAN-128, so there is no need to change the type now.

Next we bind the controls text property (the barcodes content) to the data field "Productnumber" of thedatabase. Again click the barcode with the right mouse button and select "Properties":

Have a look for the entry "Control Source" and change it to "Productnumber". This is the data binding:

Now close the design mode of the form and watch the result by simple opening the form:

Access 2000, XP, 2003 Barcodes in forms 63

The barcode control is bound to the data base field and shows the product number of the current data setas EAN-128 barcode.

Embedding and binding an ActiveBarcode control into reports is very similar.

One last hint: A report is designed in a lower resolution that it is using while printing. So it is required thatyou create the barcode control with a much bigger font size than you would normally use. Otherwise thetext line under the barcode may be very very small in your print.

Access 2000, XP, 2003 Barcodes in forms 64

ActiveBarcode Control (OCX)

ActiveBarcode Control

Embed an ActiveBarcode Object (Control, OCX, ActiveX) into your documentsand projects. It's very flexible and can be automated.

Create barcode objects directly in your documents. You can edit and automatethe barcode directly inside the documents.

Developers use ActiveBarcode like a standard control. Place the barcode controlonto your application form and get barcode technology with a few clicks!

Programmers Reference:

Here you have an overview of all properties, methods and events ofActiveBarcode. Please select one of the following chapters to getdescriptions on:

Properties• Methods• Events• The property dialog• Information about distributing the ActiveX control (EnterpriseEdition, Developer licence)

Fullsizeview PDF

Download

Barcode types:

If you want more information of barcode types, go to Codes: Codabar, Code 25 Industrial, Code 25Interleaved, Code 39, Code 39 Extended, Code 93, Code 93 Extended, Code 128, Data Matrix, DUN-14,EAN-2, EAN-5, EAN-8, EAN-13, EAN-14, EAN-18, EAN-99, EAN 128, EAN-Velocity, GS1-128, GS1-DataMatrix, GTIN-8, GTIN-12, GTIN-13, GTIN-14, Identcode, ISBN-10, ISBN-13, ISBN-13 Dual, Bookland, ISSN,ISMN, ITF-14, JAN, Leitcode, MSI, NVE, PDF417, PostNet, PZN7, PZN8, QR Code, Royal Mail SCC-14,SSCC-18, UCC-128, UPC-A and UPC-E

FAQ

If you have further questions or problems, please have a look at our FAQ.

ActiveBarcode Control (OCX) 65

Property Dialog: General

General settings

The General page of the property dialog:

You can set the following properties here:

Text:Here you enter the text to be encoded in the barcode.

Demo Text:If you push this button, a valid demo text for the current selected barcode type will be generatedautomatically.

Show Text:If you swith this checkbox on, the human readable line will be created. If it's off, the human readable linewill not be shown in the barcode control.

Type:Here you can select the barcode type. ActiveBarcode currently supports the following types: Codabar,Code 25 Industrial, Code 25 Interleaved, Code 39, Code 39 Extended, Code 93, Code 93 Extended, Code128, Data Matrix, DUN-14, EAN-2, EAN-5, EAN-8, EAN-13, EAN-14, EAN-18, EAN-99, EAN 128,EAN-Velocity, GS1-128, GS1-Data Matrix, GTIN-8, GTIN-12, GTIN-13, GTIN-14, Identcode, ISBN-10,ISBN-13, ISBN-13 Dual, Bookland, ISSN, ISMN, ITF-14, JAN, Leitcode, MSI, NVE, PDF417, PostNet, PZN7,PZN8, QR Code, Royal Mail SCC-14, SSCC-18, UCC-128, UPC-A and UPC-E

Rotate:You set the orientation/rotation of the barcode in degreess (0,90,180,270).

The property dialog: | General | Fonts | Colors | Layout |

Property Dialog: General 66

Property Dialog: General 67

Property Dialog: Fonts

Font settings

The Fonts page of the property dialog:

You can set the following properties here:

Font name:Select the font for the human readable line. You always should use TrueType fonts. Otherwise there maybe display problems when rotating the barcode.

Attributes:Select attributes for your font, e.g. bold, italic, etc.

Size:Select the size of the font.

Effects:You can use additional effects for the font here.

The property dialog: | General | Fonts | Colors | Layout |

Property Dialog: Fonts 68

Property Dialog: Colors

Color settings

The Colors page of the property dialog:

You can set the following properties here:

Propertyname:Select BackColor or ForeColor here in oeder what you want to edit.

System color:Not used here.

Color:Select a color.

The property dialog: | General | Fonts | Colors | Layout |

Property Dialog: Colors 69

Property Dialog: Layout

Layout settings

The Layout page of the property dialog:

You can set the following properties here:

Alignment:Alignment sets the alignment (0=left, 1=center, 2=right) of the barcode inside the control.

Borderheight:BorderHeight sets the height of the border above and under the barcode in pixels. The border is paintedin the current background color (BackColor).

Borderwidth:BorderWidth sets the width of the border on the left and the right of the barcode in pixels. The border ispainted in the current background color (BackColor).

NotchHeightInPercent:Sets the length of the notches in percent.

Printfix:If you have the problem that the bars of the code are too thin when printing (i.e. with Excel), set thisproperty to true.

The property dialog: | General | Fonts | Colors | Layout |

Property Dialog: Layout 70

Property Dialog: Layout 71

ActiveBarcode Commandline Tool

General

You can use the ActiveBarcode command line tool to create barcode images files directly from thecommand line. E.g. use it in batch or script programs.

The commandline tool is included in the ActiveBarcode program package. When you setup ActiveBarcodeto your system, the commandline tool also will be installed. You can find the tool namedbarcodeimage.wsf in the folder you installed ActiveBarcode to. General this is c:\programs\ActiveBarcode.

An example: The following call of the tool will create a 400x200 pixels sized PNG image file namedean.png with an EAN-13 barcode encoding "192837465012".

barcodeimage ean.png text=192837465012 typename=ean13 width=400 height=200

One more example: The following call of the tool will create a 500x100 pixels sized PNG image file namedcode128.bmp with an Code 128 barcode encoding "Hello World".

barcodeimage code128.bmp "text=Hello World" type=14 width=500 height=100

Powershell: If you want to use 'barcodeimage' with the Microsoft Windows PowerShell, you have to call itusing 'cscript'. See this example:

cscript barcodeimage.wsf code128.bmp "text=Hello World" type=14 width=500 height=100

Command line parameters for the console

Usage:barcodeimage filename [Parameter]

Parameter Description Example

ActiveBarcode Commandline Tool 72

-text= text to be encoded -text=123456789012-type= barcode type -type=0-width= width in pixels -width=500-height= height in pixels -height=500

-alignment=

Alignment1=left2=center3=right

-alignment=2

-borderwidth= borderwidth in pixels -borderwidth=10-borderheight= borderheight in pixels -borderheight=1-notchheightinpercent= the notch height in % -notchheightinpercent=25-showtext=off no textline under the code -showtext=off

-forecolor= sets the foreground colorhexadecimal RGB as RRGGBB

-foreground=000000(example is black)

-backcolor= sets the background colorhexadecimal RGB as RRGGBB

-background=FFFFFF(example is white)

-fontname= font for the text line -fontname=arial-fontsize= font size -fontsize=8-fontbold= font bold (on/off) -fontbold=on-fontitalic= font italic (on/off) -fontitalic=on-fontunderline= font underline (on/off) -fontunderline=on-fontstrikeout= font strikeout (on/off) -fontstrikeout=on

-filetype=

file type of image(valid values: bmp, jpg, png, tif, tga, gif, wbm, pbm,pgm, ppm, xpm, wmf, emf)Default: auto detect by extension of filename

-filetype=bmp

-colordepth= colordepth of the image file(valid values: 1,8,16,24,36) -colordepth=24

-flags= flags for the image file -flags=0x80

-angle= rotates the image file(valid values: 0-359) -angle=180

-transparent= background transparency(valid values: 0, 1, not implemented yet) -transparent=1

-dpi= resolution in DPI for jpg, png, tif & bmp files -dpi=300

-echo=

off: display no messageserrors: display only errorsverbose:display all messages and open barcode inImageView

-echo=off-echo=errors-echo=verbose

64bit Windows

If you want to use the barcodeimage.wsf program under Windows 64bit, you need to run thebarcodeimage.wsf in 32-bit, as the control is 32-bit too. On 64bit machines wsf files are running in 64bitmode by default.

Have a look for a 32bit version of the cscript.exe or wscript.exe on your machine and then call the scriptusing the following commands:

ActiveBarcode Commandline Tool 73

cscript.exe barcodeimage.wsforwscript.exe barcodeimage.wsf

In general the cscript and/or wscript files are located in the %windir%\syswWOW64 folder.

Example

For example you can use the command line tool to createbarcodes dynamically in a OpenOffice document. We have createdan example file for OpenOffice Calc that creates barcodes from alist of numbers right beside the numbers in a sheet.

You can download this example file directly using this link:ab_barcodelist.ods

Please have a look at the notes inside this document: You mayhave to edit the path of the command line tool inside the macro.

ActiveBarcode Commandline Tool 74

Barcode types

ActiveBarcode supports the following barcode types:

ActiveBarcode calculates the check digit - where available - automatically for you.

Code Beispiel Length Character set Description

Code 128 variable ASCII (128chars)

Modern 1D type of barcode. Has highlycopmpressed data. Very often used.

GS1-128,EAN-128,UCC-128

variable ASCII (128chars)

This special form of the Code 128 is used forgoods and palettes in commerce andindustry. More than one data field can beencoded using Application Identifiers.

EAN-13,GTIN-13 13 numeric 0-9

The EAN code is primarily used insupermarkets to identify products at thepoint of sales.

QR Code variable ASCII2D barcode for encoding mass text or data inonly one code. Often used for Mobile-Taggingwith cell phones.

Data Matrix variable ASCII 2D barcode for encoding mass text or data inonly one code.

GS1-DataMatrix variable ASCII (128

chars)

This special form of the Data Matrix is usedfor goods and palettes in commerce andindustry. More than one data field can beencoded using Application Identifiers.

EAN-8, GTIN-8 8 numeric 0-9 This is the short version of EAN-13 forextremly small products.

PDF417 variable ASCII 2D barcode for encoding mass text or data inonly one code.

ISBN-13 13 numeric 0-9 International Standard Book Number. ISBNstandard type since 01. January 2007.

ISSN 8 numeric 0-9

International Standard Serial Number. TheISSN serves the short unmistakeableidentification of sequentially appearingpublications, e.g., magazines.

ISMN 10 numeric 0-9The ISMN (Internationally Standard MusicNumber) is used for marking printed musicalpublications.

Barcode types 75

EAN-14,GTIN-14 14 numeric 0-9 The EAN 14 code is used for traded goods

DUN-14 14 numeric 0-9 Distribution Unit Number. Also have a look atEAN-14 and ITF-14.

SCC-14 14 numeric 0-9 Shipping Container Symbol. Also have a lookat EAN-14 and ITF-14.

ITF-14 14 numeric 0-9

The ITF-14 barcode is used to create theShipping Container Symbol. This code is usedto mark cartons and palettes that areincluding goods with an EAN-13 code.

EAN-18/NVE 18 numeric 0-9 The EAN 18/NVE is used to display theNummer der Versandeinheit (NVE).

SSCC-18 18 numeric 0-9Serial Shipping Container Code. It is usedthroughout the supply chain as an identifierfor item tracing and internal control.

UPC-A, GTIN-12 12 numeric 0-9The UPC A code is the standard version of theUPC code and has 12 digits. It is also calledUPC 12 and is very similar to the EAN code.

UPC-E 8 numeric 0-9 This is the short version of UPC-A forextremly small products.

Code 39 variable A-Z, 0-9, 5special chars

Also known as Code 3 of 9. Often used typethat is self checking.

Code 39Extended variable ASCII (127

chars)Also known as Code 3 of 9 Extended.Extension of Code 39.

Code 25 variable numeric 0-9 Also known as Code 2 of 5 and Code 25Industrial. Rather old code for industrial use.

Code 25Interleaved variable numeric 0-9 Also known as Code 2 of 5 Interleaved.

Industrial use.

JAN 13 numeric 0-9Japanese Article Numbering. It's primarilyused in supermarkets to identify product atthe point of sales.

EAN-5 5 numeric 0-9 AddOn code. For example for books (seeISBN).

Barcode types 76

EAN-2 2 numeric 0-9 AddOn code. For example for magazines.

EAN-99 13 numeric 0-9"EAN-99 is a special form of the EAN-13,which just starts with ""99"". EAN 99 is usedas an in-store coupon."

EAN-Velocity 8 numeric 0-9

EAN-Velocity is a special form of the EAN-8.This code is internally used by dealers forproducts that have no EAN-13 or EAN-8 codefrom the producer.

ISBN-13 Dual 13 numeric 0-9International Standard Book Number. ISBNtransitional type from 01. January 2006 to 31.December 2006.

ISBN-10 13 numeric 0-9 International Standard Book Number. ISBNstandard type until 31. December 2005.

Codabar variable 0-9, 6 specialcharacters

Old barcode type. Often used in medicine inthe past.

Code 93 variable A-Z, 0-9, 5special chars

Same characterset as Code 39 but morecompacted code that requires less space.

Code 93Extended variable ASCII (127

chars)

Same characterset as Code 39 Extended butmore compacted code that requires lessspace.

PZN7 7 numeric 0-9 Pharmazentralnummer für medicine. Specialform of Code 39.

PZN8 7 numeric 0-9 Pharmazentralnummer für medicine. Specialform of Code 39.

Leitcode 14 numeric 0-9 The Leitcode is used by Deutschen Post/DHL.

Identcode 12 numeric 0-9 The Identcode is used by DeutschenPost/DHL.

Code 128A variable

Uppercaseletters andcontrolcharacters

Subcode of Code 128. This type is normallynot used for itself. Use Code 128 or EAN 128instead.

Code 128B variableUpper- andlowercaseletters

Subcode of Code 128. This type is normallynot used for itself. Use Code 128 or EAN 128instead.

Barcode types 77

Code 128C variable numeric 0-9Subcode of Code 128. This type is normallynot used for itself. Use Code 128 or EAN 128instead.

MSI Plessey variable numeric 0-9 Old code typ. Was used for goods and booksin the past.

PostNet variable numeric 0-9 This code us used to improve the speed ofsorting and delivering of mail.

Royal Mail variable A-Z, 0-9The Royal Mail 4 State Customer Code(RM4SCC) was created for automated mailsortation processes.

(*) This type number is the number of the barcode of the control's property Type.

Barcode types 78

OCX: Properties

Properties of des Controls

Name Type Description read-only

Text char Text contains the content of the barcode. Generalwithout check digit. -

ShowText boolTRUE: The barcode has a human readable text.(default)FALSE: The barcode is displayed without the text.

-

Type long Specifies the barcode type. -

Rotate long Rotate contains the orientation of the displayedbarcode in degreess (0,90,180,270). -

Alignment AlignConstantsAlignment sets the alignment (on the left, on theright, centered) of the barcode. You can passAlignLeft, AlignCenter or AlignRight.

-

TypeName char Contains the name of the barcode type. -

IsValid bool Returns TRUE if the barcode is valid. If it's invalid, thetext cannot be coded with the selected barcode type. read-only

IsSizeOk bool

Returns TRUE if the barcode is displayed correct. Ifit's FALSE, the barcode cannot be displayed becausethe controls dimensions are too small to display thebarcode correct.

read-only

Checksum long Returns the check digit. read-onlyPicture pictureobject Returns the barcode picture. read-onlyBackColor OLE_Color Background color of the barcode. -ForeColor OLE_Color Foreground color of the barcode. -

Font fontobject Specifies the font by name, style, effects and the sizefor the text line. -

Version char Returns the controls version number. read-only

BorderHeight longBorderHeight sets the height of the border above andunder the barcode in pixels. The border is painted inthe current background color (BackColor).

-

BorderWidth longBorderWidth sets the width of the border on the leftand the right of the barcode in pixels. The border ispainted in the current background color (BackColor).

-

MaxBorderHeight long MaxBorderHeight returns the maximum possiblevalue of BorderHeight. read-only

MaxBorderWidth long MaxBorderWidth returns the maximum possiblevalue of BorderWidth. read-only

NotchHeightInPercent long Sets the length of the notches in percent. -

PrintFix boolIf you have the problem that the bars of the code aretoo thin when printing (i.e. with Excel), set thisproperty to true.

-

AutoType bool This property should not be used. It's onlyimplemented for compatibility purposes to oldversions. ActiveBarcde tries to detect the barcode

-

OCX: Properties 79

type automatically.

OCX: Properties 80

OCX: Methods

Methods of the Control

Name Parameter Description

CopyToClipboard : boolCopies the barcode in meta graphicformat to the clipboard. ReturnsTRUE if successful.

CopyToClipboardBySize (Width: Integer, Height: Integer):Bool

Copies the barcode in meta graphicformat to the clipboard. The size ofthe barcode is specified by thearguments width and height. ReturnsTRUE if successful.

CreatePictureBySize (Width: Integer, Height: Integer):Bool

Allows a custom sized Pictureproperty to be handled. The size ofthe barcode picture is specified bythe arguments width and height.Returns TRUE if successful.

SaveAs (path: WideString): Smallint

Saves the current barcode as imagefile (BMP, JPEG, PNG, TIFF, Targa,GIF, WMF, EMF, PBM, PGM, PPM,WBMP and XPM). The image size isthe current size of the control. Theimage file type used is defined bythe extension of the file name (e.g.BMP for a Windows Bitmap).

SaveAsBySize (path: WideString, Width: Integer,Height: Integer): Smallint

Saves the current barcode as imagefile (BMP, JPEG, PNG, TIFF, Targa,GIF, WMF, EMF, PBM, PGM, PPM,WBMP and XPM). The image size isspecified by the parameters widthand height. The image file type usedis defined by the extension of the filename (e.g. BMP for a WindowsBitmap).

SaveAsBySizeExtended

(path: WideString, Width: Integer,Height: Integer, Format: Integer,ColorDepth: Integer, Transparent:Integer, Flags: Integer, Angle:Integer, DPI: Integer): Smallint

Extended version of theSaveAsBySize Method.

SetDemoText -

Sets the property Text to a validdefault value. Use this fordemonstration or test purposes toget a valid code.

BinaryWriteAsPNGBySize (Width: Integer, Height: Integer):OleVariant

Returns the current barcode inbinary PNG image format. The size isspecified by Width and Heightparameters. This method is onlyavailable in the Enterprise Edition.

BinaryWriteAsPNG : OleVariant

OCX: Methods 81

Returns the current barcode incurrent size binary PNG imageformat. This method is only availablein the Enterprise Edition.

AboutBox -Opens the info dialog ofActiveBarcode and shows Versionand other details.

SaveAsPNG (path: WideString): SmallintSaves the current barcode as PNGimage file. The image size is thecurrent size of the control.

SaveAsPNGBySize (path: WideString, Width: Integer,Height: Integer): Smallint

Saves the current barcode as PNGimage file. The image size isspecified by the paramters width andheight.

OCX: Methods 82

OCX: Events

Events of the Control

Name Parameter Description

TypeChange BarcodeType:long Is triggered when the barcode type is changed. The property Typeis passed and can be used.

TextChange Text:char Is triggered when the barcode text is changed. The property Textis passed and can be used.

ShowTextChange ShowText:bool Is triggered when the display of the barcode text enabled ordisabled. The property ShowText is passed and can be used.

AutoTypeChange AutoType:bool Is triggered when the Autotype option is enabled or disabled. Theproperty Autotype is passed and can be used.

PrintFixChange PrintFix:bool Is triggered when the PrintFix option is enabled or disabled. Theproperty PrintFix is passed and can be used.

OCX: Events 83

Property: Text

Text char

Text contains the content of the barcode. General without check digit.

Property: Text 84

Property: ShowText

ShowText bool

TRUE: The barcode has a human readable text. (default)FALSE: The barcode is displayed without the text.

Examples:

ShowText=TRUE ShowText=FALSE

Please note that some barcode types have no human readable text based on the specification. Thisapplies to QR Code, PDF417 and DataMatrix. The ShowText property has no effect, when using one of thiscodes.

Property: ShowText 85

Property: Type

Type long

Specifies the barcode type.

value long Code Name0 ISBN-10 CODEISBN1 (default) EAN 13 CODEEAN132 EAN 8 CODEEAN83 EAN 5 CODEEAN54 EAN 2 CODEEAN25 UPC A CODEUPCA6 Code 39 CODE39

7 Code 25Interleaved CODE25I

8 Codabar CODABAR

9 Code 25Industrial CODE25

10 Code 39Extended CODE39E

11 Code 128A CODECODE128A12 Code 128B CODECODE128B13 Code 128C CODECODE128C14 Code 128 CODECODE12815 EAN/UCC 128 CODEEAN12816 EAN 99 CODEEAN9917 UPC E CODEUPCE18 PostNet CODEPOSTNET19 Royal Mail CODEROYALMAIL20 MSI CODEMSI21 Code 93 CODE93

22 Code 93Extended CODE93E

23 PZN7 CODEPZN824 Identcode CODEINDENTCODE25 Leitcode CODELEITCODE

26 Code 39Checksum CODE39CHECKSUM

27Code 39ExtendedChecksum

CODE39ECHECKSUM

28 EAN/UCC 128 AI CODEEAN128AI29 EAN 14 CODEEAN14

Property: Type 86

30 ITF-14 CODEITF1431 EAN-18/NVE CODEEAN1832 SSCC-18 CODESSCC18

33 CodabarChecksum CODABARCHECKSUM

34Code 25InterleavedChecksum

CODE25ICHECKSUM

35Code 25IndustrialChecksum

CODE25CHECKSUM

36 PDF417 CODEPDF41737 DataMatrix CODEDATAMATRIX38 ISBN-13 CODEISBN1339 ISBN-13 Dual CODEISBN13DUAL40 ISSN CODEISSN41 ISMN CODEISMN

42 DataMatrixSquare CODEDATAMATRIXSQUARE

43 DataMatrixRectangular CODEDATAMATRIXRECTANGULAR

44 DataMatrix10x10 CODEDATAMATRIX10X10

45 DataMatrix12x12 CODEDATAMATRIX12X12

46 DataMatrix8x18 CODEDATAMATRIX8X18

47 DataMatrix14x14 CODEDATAMATRIX14X14

48 DataMatrix8x32 CODEDATAMATRIX8X32

49 DataMatrix16x16 CODEDATAMATRIX16X16

50 DataMatrix12x26 CODEDATAMATRIX12X26

51 DataMatrix18x18 CODEDATAMATRIX18X18

52 DataMatrix20x20 CODEDATAMATRIX20X20

53 DataMatrix12x36 CODEDATAMATRIX12X36

54 DataMatrix22x22 CODEDATAMATRIX22X22

55 DataMatrix16x36 CODEDATAMATRIX16X36

56 DataMatrix24x24 CODEDATAMATRIX24X24

Property: Type 87

57 DataMatrix26x26 CODEDATAMATRIX26X26

58 DataMatrix16x48 CODEDATAMATRIX16X48

59 DataMatrix32x32 CODEDATAMATRIX32X32

60 DataMatrix36x36 CODEDATAMATRIX36X36

61 DataMatrix40x40 CODEDATAMATRIX40X40

62 DataMatrix44x44 CODEDATAMATRIX44X44

63 DataMatrix48x48 CODEDATAMATRIX48X48

64 DataMatrix52x52 CODEDATAMATRIX52X52

65 DataMatrix64x64 CODEDATAMATRIX64X64

66 DataMatrix72x72 CODEDATAMATRIX72X72

67 DataMatrix80x80 CODEDATAMATRIX80X80

68 DataMatrix88x88 CODEDATAMATRIX88X88

69 DataMatrix96x96 CODEDATAMATRIX96X96

70 DataMatrix104x104 CODEDATAMATRIX104X104

71 DataMatrix120x120 CODEDATAMATRIX120X120

72 DataMatrix132x132 CODEDATAMATRIX132X132

73 DataMatrix144x144 CODEDATAMATRIX144X144

74 GS1-DataMatrix CODEGS1DATAMATRIX

75 GS1-DataMatrix Square CODEGS1DATAMATRIXSQUARE

76GS1-DataMatrixRectangular

CODEGS1DATAMATRIXRECTANGULAR

77 GS1-DataMatrix 10x10 CODEGS1DATAMATRIX10X10

78 GS1-DataMatrix 12x12 CODEGS1DATAMATRIX12X12

79 GS1-DataMatrix 8x18 CODEGS1DATAMATRIX8X18

80 CODEGS1DATAMATRIX14X14

Property: Type 88

GS1-DataMatrix 14x14

81 GS1-DataMatrix 8x32 CODEGS1DATAMATRIX8X32

82 GS1-DataMatrix 16x16 CODEGS1DATAMATRIX16X16

83 GS1-DataMatrix 12x26 CODEGS1DATAMATRIX12X26

84 GS1-DataMatrix 18x18 CODEGS1DATAMATRIX18X18

85 GS1-DataMatrix 20x20 CODEGS1DATAMATRIX20X20

86 GS1-DataMatrix 12x36 CODEGS1DATAMATRIX12X36

87 GS1-DataMatrix 22x22 CODEGS1DATAMATRIX22X22

88 GS1-DataMatrix 16x36 CODEGS1DATAMATRIX16X36

89 GS1-DataMatrix 24x24 CODEGS1DATAMATRIX24X24

90 GS1-DataMatrix 26x26 CODEGS1DATAMATRIX26X26

91 GS1-DataMatrix 16x48 CODEGS1DATAMATRIX16X48

92 GS1-DataMatrix 32x32 CODEGS1DATAMATRIX32X32

93 GS1-DataMatrix 36x36 CODEGS1DATAMATRIX36X36

94 GS1-DataMatrix 40x40 CODEGS1DATAMATRIX40X40

95 GS1-DataMatrix 44x44 CODEGS1DATAMATRIX44X44

96 GS1-DataMatrix 48x48 CODEGS1DATAMATRIX48X48

97 GS1-DataMatrix 52x52 CODEGS1DATAMATRIX52X52

98 GS1-DataMatrix 64x64 CODEGS1DATAMATRIX64X64

99 None CODENONE

100 GS1-DataMatrix 72x72 CODEGS1DATAMATRIX72X72

101 GS1-DataMatrix 80x80 CODEGS1DATAMATRIX80X80

102 GS1-DataMatrix 88x88 CODEGS1DATAMATRIX88X88

103 GS1-DataMatrix 96x96 CODEGS1DATAMATRIX96X96

104 CODEGS1DATAMATRIX104X104

Property: Type 89

GS1-DataMatrix 104x104

105 GS1-DataMatrix 120x120 CODEGS1DATAMATRIX120X120

106 GS1-DataMatrix 132x132 CODEGS1DATAMATRIX132X132

107 GS1-DataMatrix 144x144 CODEGS1DATAMATRIX144X144

108 GS-128 CODEGS1128109 GTIN-8 CODEGTIN8110 GTIN-12 CODEGTIN12111 GTIN-13 CODEGTIN13112 GTIN-14 CODEGTIN14113 QR Code CODEQRCODE

114 QR Code ECCLevel L CODEQRCODEECCLEVELL

115 QR Code ECCLevel M CODEQRCODEECCLEVELM

116 QR Code ECCLevel Q CODEQRCODEECCLEVELQ

117 QR Code ECCLevel H CODEQRCODEECCLEVELH

118 QR Code 21x21 CODEQRCODE21X21119 QR Code 25x25 CODEQRCODE25X25120 QR Code 29x29 CODEQRCODE29X29121 QR Code 33x33 CODEQRCODE33X33122 QR Code 37x37 CODEQRCODE37X37123 QR Code 41x41 CODEQRCODE41X41124 QR Code 45x45 CODEQRCODE45X45125 QR Code 49x49 CODEQRCODE49X49126 QR Code 53x53 CODEQRCODE53X53127 QR Code 57x57 CODEQRCODE57X57128 QR Code 61x61 CODEQRCODE61X61129 QR Code 65x65 CODEQRCODE65X65130 QR Code 69x69 CODEQRCODE69X69131 QR Code 73x73 CODEQRCODE73X73132 QR Code 77x77 CODEQRCODE77X77133 QR Code 81x81 CODEQRCODE81X81134 QR Code 85x85 CODEQRCODE85X85135 QR Code 89x89 CODEQRCODE89X89136 QR Code 93x93 CODEQRCODE93X93137 QR Code 97x97 CODEQRCODE97X97

138 QR Code101x101 CODEQRCODE101X101

139 CODEQRCODE105X105

Property: Type 90

QR Code105x105

140 QR Code109x109 CODEQRCODE109X109

141 QR Code113x113 CODEQRCODE113X113

142 QR Code117x117 CODEQRCODE117X117

143 QR Code121x121 CODEQRCODE121X121

144 QR Code125x125 CODEQRCODE125X125

145 QR Code129x129 CODEQRCODE129X129

146 QR Code133x133 CODEQRCODE133X133

147 QR Code137x137 CODEQRCODE137X137

148 QR Code141x141 CODEQRCODE141X141

149 QR Code145x145 CODEQRCODE145X145

150 QR Code149x149 CODEQRCODE149X149

151 QR Code153x153 CODEQRCODE153X153

152 QR Code157x157 CODEQRCODE157X157

153 QR Code161x161 CODEQRCODE161X161

154 QR Code165x165 CODEQRCODE165X165

155 QR Code169x169 CODEQRCODE169X169

156 QR Code173x173 CODEQRCODE173X173

157 QR Code177x177 CODEQRCODE177X177

158 PZN8 CODEPZN8

Property: Type 91

Property: Rotate

Rotate long

Rotate contains the orientation of the displayed barcode in degreess (0,90,180,270).

Examples:

0 degrees 90 degrees 180 degrees 270 degrees

Property: Rotate 92

Property: Alignment

Alignment AlignConstants

Alignment sets the alignment (on the left, on the right, centered) of the barcode. You can pass AlignLeft,AlignCenter or AlignRight.

Beispiele:

AlignLeft

AlignCenter

AlignRight

Declaration of 'AlignConstants':

type AlignConstants = TOleEnum;const ALIGNLEFT = $00000000; ALIGNCENTER = $00000001; ALIGNRIGHT = $00000002;

Property: Alignment 93

Property: TypeName

TypeName char

Contains the name of the barcode type.

Property: TypeName 94

Property: IsValid

IsValid bool read-only

Returns TRUE if the barcode is valid. If it's invalid, the text cannot be coded with the selected barcodetype.

Property: IsValid 95

Property: IsSizeOk

IsSizeOk bool read-only

Returns TRUE if the barcode is displayed correct. If it's FALSE, the barcode cannot be displayed becausethe controls dimensions are too small to display the barcode correct.

Property: IsSizeOk 96

Property: Checksum

Checksum long read-only

Returns the check digit.

Property: Checksum 97

Property: Picture

Picture pictureobject read-only

Returns the barcode picture.

Property: Picture 98

Property: BackColor

BackColor OLE_Color

Background color of the barcode.

Examples:

White BackColor Green BackColor

Property: BackColor 99

Property: ForeColor

ForeColor OLE_Color

Foreground color of the barcode.

Examples:

Black Forecolor Green Forecolor

Property: ForeColor 100

Property: Font

Font fontobject

Specifies the font by name, style, effects and the size for the text line.

The Font property is an object which illustrates the different properties of the font.

General the usage of the font object is as follows::

Change the size: Barcode1.Font.Size = 10

Change the Font:Barcode1.Font.Name = "Arial"

Change the style and the effects:Barcode1.Font.Bold = TrueBarcode1.Font.Italic = TrueBarcode1.Font.Underline = TrueBarcode1.Font.Strikethrough = True

In some developing environments these properties are determined by enumeration types, e.g. Delphi.Have a look in the help of the developing system for information how to handle them.

Examples:

Font: Arial, 12pt, Bold Font: Comix, 14pt, Standard

Property: Font 101

Property: Version

Version char read-only

Returns the controls version number.

Property: Version 102

Property: BorderHeight

BorderHeight long

BorderHeight sets the height of the border above and under the barcode in pixels. The border is paintedin the current background color (BackColor).

Examples:

BorderHeight=4 BorderHeight=20

Property: BorderHeight 103

Property: BorderWidth

BorderWidth long

BorderWidth sets the width of the border on the left and the right of the barcode in pixels. The border ispainted in the current background color (BackColor).

Property: BorderWidth 104

Property: MaxBorderHeight

MaxBorderHeight long read-only

MaxBorderHeight returns the maximum possible value of BorderHeight.

Property: MaxBorderHeight 105

Property: MaxBorderWidth

MaxBorderWidth long read-only

MaxBorderWidth returns the maximum possible value of BorderWidth.

Property: MaxBorderWidth 106

Property: NotchHeightInPercent

NotchHeightInPercent long

Sets the length of the notches in percent.

Examples:

NotchHeightInPercent=50 NotchHeightInPercent=100

NotchHeightInPercent=0

Property: NotchHeightInPercent 107

Property: PrintFix

PrintFix bool

If you have the problem that the bars of the code are too thin when printing (i.e. with Excel), set thisproperty to true.

Property: PrintFix 108

Property: AutoType

AutoType bool

This property should not be used. It's only implemented for compatibility purposes to old versions.ActiveBarcde tries to detect the barcode type automatically.

Property: AutoType 109

Method: CopyToClipboard

CopyToClipboard : bool

Copies the barcode in meta graphic format to the clipboard. Returns TRUE if successful.

Method: CopyToClipboard 110

Method: CopyToClipboardBySize

CopyToClipboardBySize (Width: Integer, Height: Integer): Bool

Copies the barcode in meta graphic format to the clipboard. The size of the barcode is specified by thearguments width and height. Returns TRUE if successful.

Method: CopyToClipboardBySize 111

Method: CreatePictureBySize

CreatePictureBySize (Width: Integer, Height: Integer): Bool

Allows a custom sized Picture property to be handled. The size of the barcode picture is specified by thearguments width and height. Returns TRUE if successful.

Method: CreatePictureBySize 112

Method: SaveAs

SaveAs (path: WideString): Smallint

Saves the current barcode as image file (BMP, JPEG, PNG, TIFF, Targa, GIF, WMF, EMF, PBM, PGM, PPM,WBMP and XPM). The image size is the current size of the control. The image file type used is defined bythe extension of the file name (e.g. BMP for a Windows Bitmap).

This method supports the following image formats: Windows Bitmap (BMP), JPEG, PNG, TIFF, Targa, GIF,WMF, EMF, PBM, PGM, PPM, Wireless Bitmap (WBMP) and XPM.

Related topic: Image file options

Method: SaveAs 113

Method: SaveAsBySize

SaveAsBySize (path: WideString, Width: Integer, Height:

Integer): Smallint

Saves the current barcode as image file (BMP, JPEG, PNG, TIFF, Targa, GIF, WMF, EMF, PBM, PGM, PPM,WBMP and XPM). The image size is specified by the parameters width and height. The image file typeused is defined by the extension of the file name (e.g. BMP for a Windows Bitmap).

This method supports the following image formats: Windows Bitmap (BMP), JPEG, PNG, TIFF, Targa, GIF,WMF, EMF, PBM, PGM, PPM, Wireless Bitmap (WBMP) and XPM.

Related topic: Image file options

Method: SaveAsBySize 114

Method: SaveAsBySizeExtended

SaveAsBySizeExtended (path: WideString, Width: Integer,

Height: Integer, Format: Integer, ColorDepth: Integer,

Transparent: Integer, Flags: Integer, Angle: Integer, DPI:

Integer): Smallint

Extended version of the SaveAsBySize Method.

Saves the current barcode as image file.

The image size is specified by the parameters width and height.

The image file type is specified by the parameter format. Set it to -1 if you want to use the automatic filetype selection by the file names extension.

The color depth is set in bit (1,8,16,24,32).

The option transparent is not implemented yet. Set it to 0 if not transparency is wanted and to -1 to setthe background transparent.

Use the flags for special options.

The option angle is used to rotate the image. Set the rotation in degrees (0-359). To overrule this optionwith the currect setting of the rotate property set angle to -1.

Use the parameters dpi to set a specific resolution in DPI for the image file. This can be used in the imageformats BMP, JPEG, TIF and PNG. (0=set no DPI value)

Here you can see a list of the supported image file types, color depths and flags.

This method supports the following image formats: Windows Bitmap (BMP), JPEG, PNG, TIFF, Targa, GIF,WMF, EMF, PBM, PGM, PPM, Wireless Bitmap (WBMP) and XPM.

Return values of this function:0 : File save ok. No errors.1 : Error while saving file.2 : Wrong colordepth for this file format3 : Colordepth/angle combination not possible4 : Filetype not supported5 : Low memory6 : Low memory7 : Low memory

Method: SaveAsBySizeExtended 115

Method: SaveAsBySizeExtended 116

ActiveBarcode Control: Image file options

Supported image file formats

The functions SaveAs, SaveAsBySize and SaveAsBySizeExtended of the ActiveBarcode Control supportdifferent image formats and color depths:

Image format Extension Format 1-bit s/w 8-bit 16-bit 24-bit 32-bitWindows Bitmap BMP 0 yes yes yes yes defaultJPEG JPG, JPEG 2 - gray - default -Portable Network Graphic PNG 13 yes yes - default yesTIFF TIF 18 yes yes - default yesTarga TGA 17 - yes yes default yesGIF GIF 25 yes default - - -Windows Metafile Format WMF 101 - - - default -Enhanced Metafile Format EMF 100 - - - default -Wireless Bitmap WBM, WBMP 19 default - - - -Portable Bit Map PBM 7 default - - - -Portable Gray Map PGM 11 - gray/default - - -Portable Pixel Map PPM 14 - - - default -X Pix Map XPM 23 - - - default -

Color depths marked as default are used when you use the SaveAs, SaveAsBySize function or when youset the color depth to zero when using the function SaveAsBySizeExtended.

Color depths for image files

Supported color depths are:

colordepth Description1 1-bit monochrome, the image will be b/w.8 8-bit colours or grayscale depending on the image format16 16-bit TrueColor24 24-bit TrueColor32 32-bit TrueColor

Please note that not every color depth is available for every image file format.

ActiveBarcode Control: Image file options 117

Supported flags for image files

You can use the following flags when saving image files:

Image format Flag DescriptionBMP 0x1 Saves the bitmap as RLE (Run Length Encoded)

JPG, JPEG

0x800x1000x2000x4000x800

JPEG Qualität "Super" (100%)JPEG Qualität "Good" (75%)JPEG Qualität "Normal" (50%)JPEG Qualität "Average" (25%)JPEG Qualität "Poor" (10%)

DPI settings

When saving as JPEG, PNG, TIFF or BMP image format you can set the DPI (Dots per Inch), if you are usingthe SaveAsBySizeExtended method.

ActiveBarcode Control: Image file options 118

Method: SetDemoText

SetDemoText

Sets the property Text to a valid default value. Use this for demonstration or test purposes to get a validcode.

Method: SetDemoText 119

Method: AboutBox

AboutBox

Opens the info dialog of ActiveBarcode and shows Version and other details.

Example:

Aboutbox

Method: AboutBox 120

Method: BinaryWriteAsPNGBySize

BinaryWriteAsPNGBySize (Width: Integer, Height: Integer):

OleVariant

Returns the current barcode in binary PNG image format. The size is specified by Width and Heightparameters. This method is only available in the Enterprise Edition.

Method: BinaryWriteAsPNGBySize 121

Method: BinaryWriteAsPNG

BinaryWriteAsPNG : OleVariant

Returns the current barcode in current size binary PNG image format. This method is only available in theEnterprise Edition.

Method: BinaryWriteAsPNG 122

Method: SaveAsPNG

SaveAsPNG (path: WideString): Smallint

Saves the current barcode as PNG image file. The image size is the current size of the control.

Tip:This function has become outdated and is contained in ActiveBarcode only for reasons of compatibility.You should use the function SaveAs instead which supports more file formats.

Method: SaveAsPNG 123

Method: SaveAsPNGBySize

SaveAsPNGBySize (path: WideString, Width: Integer, Height:

Integer): Smallint

Saves the current barcode as PNG image file. The image size is specified by the paramters width andheight.

Tip:This function has become outdated and is contained in ActiveBarcode only for reasons of compatibility.You should use the function SaveAsBySize instead which supports more file formats.

Method: SaveAsPNGBySize 124

Event: TypeChange

TypeChange (BarcodeType:long)

Is triggered when the barcode type is changed. The property Type is passed and can be used.

Event: TypeChange 125

Event: TextChange

TextChange (Text:char)

Is triggered when the barcode text is changed. The property Text is passed and can be used.

Event: TextChange 126

Event: ShowTextChange

ShowTextChange (ShowText:bool)

Is triggered when the display of the barcode text enabled or disabled. The property ShowText is passedand can be used.

Event: ShowTextChange 127

Event: AutoTypeChange

AutoTypeChange (AutoType:bool)

Is triggered when the Autotype option is enabled or disabled. The property Autotype is passed and can beused.

Event: AutoTypeChange 128

Event: PrintFixChange

PrintFixChange (PrintFix:bool)

Is triggered when the PrintFix option is enabled or disabled. The property PrintFix is passed and can beused.

Event: PrintFixChange 129

Information for developers

To use this functionality you require the Enterprise Edition

Distribution of the ActiveX Control with your own programse.g. developed with C++, C#, Visual Basic, Delphi etc.

The following information is only for owners of the Enterprise Edition. If you own a Standard Edition, youhave no license to distribute any files.

If you create an application with the ActiveBarcode ActiveX Control (OCX) and want to distribute, youmust make sure that certain files on the target system are installed or exist.

Your are only allowed to distribute the ActiveX Control of ActiveBarcode (activebarcode.ocx)and the necessary DLL's (mfc42.dll, msvcrt.dll, olepro32.dll). If you distribute other files, as forexample the ActiveBarcode Application or a license file (*.lic), this is an offense against the license. Pleasealways be sure, that you only distribute the files you are allowed to.

The ActiveX Control (OCX) must be registered in the system before it can be used. You can do this fromthe command prompt with the following command:

regsvr32 activebarcode.ocx

Open the command prompt with administrator rights, otherwise the registration in the system can fail.When using x64 Windows please launch the regsvr32.exe application from the \Windows\System32 or\Windows\SysWOW64 folder. (Example: regsvr32 "c:\program files(x86)\activebarcode\activebarcode.ocx")

This application (regsvr32) is included with Windows. A lot of installations tools (as for example Innosetup) can do this registration during the installation, so that the above manual registration is notnecessary.

Please note that you have no permission to distribute an application that's exclusive purpose it is tocreate barcodes.

Required DLL's

ActiveBarcode required some system DLL's to run properly. If you run the setup of ActiveBarcode theseDLL's are automatically installed or updated.

If you distribute ActiveBarcode with your application, you'll need to ensure that the DLL's on the targetsystem are available at least in the following versions:

mfc42.dll - 4.21.0.7022msvcrt.dll - 5.0.4058.1olepro32.dll - 5.0.0.7022

Current Windows versions already carry this or newer versions and there is no need to update them. Ourexperiences point that there is no need to update these DLL's in Windows 98SE or above.

Information for developers 130

Information for developers 131