RAztecCode ActiveX

Copyright J4L (http://www.java4less.com) 2006.

Introduction

RAztecCodeX is an ActiveX control developed using Visual Basic 6.0 and will allow you to create 2 dimensional AztecCode barcodes for your windows applications.

 

Aztec Code is a 2D matrix symbology made up of square modules on a square grid, with a square bullseye pattern at their center. Aztec Code symbols can encode large amounts of data with user defined error correction level.

The smallest format can encode 13 numeric , 12 alphabetic characters or 6 bytes of data, while the largest format can encode 3832 numeric ,3067 alphabetic characters or 1914 bytes of data.

available formats are:

 

Rows / columns (number of modules/squares)
Capacity (digits)
Capacity (text)
Capacity (binary data)
CONFIGURATION_15X15_COMPACT
13
12
6
CONFIGURATION_19X19
18
15
8
CONFIGURATION_19X19_COMPACT
40
33
19
CONFIGURATION_23X23
49
40
24
CONFIGURATION_23X23_COMPACT
70
57
33
CONFIGURATION_27X27
84
68
40
CONFIGURATION_27X27_COMPACT
110
89
53
CONFIGURATION_31X31
128
104
62
CONFIGURATION_37X37
178
144
87
CONFIGURATION_41X41
232
187
114
CONFIGURATION_45X45
294
236
145
CONFIGURATION_49X49
362
291
179
CONFIGURATION_53X53
433
348
214
CONFIGURATION_57X57
516
414
256
CONFIGURATION_61X61
601
482
298
CONFIGURATION_67X67
691
554
343
CONFIGURATION_71X71
793
636
394
CONFIGURATION_75X75
896
896
446
CONFIGURATION_79X79
1008
808
502
CONFIGURATION_83X83
1123
900
559
CONFIGURATION_87X87
1246
998
621
CONFIGURATION_91X91
1378
1104
687
CONFIGURATION_95X95
1511
1210
753
CONFIGURATION_101X101
1653
1324
824
CONFIGURATION_105X105
1801
1442
898
CONFIGURATION_109X109
1956
1566
976
CONFIGURATION_113X113
2216
1694
1056
CONFIGURATION_117X117
2281
1826
1138
CONFIGURATION_121X121
2452
1963
1224
CONFIGURATION_125X125
2632
2107
1314
CONFIGURATION_131X131
2818
2256
1407
CONFIGURATION_135X135
3007
2407
1501
CONFIGURATION_139X139
3205
2565
1600
CONFIGURATION_143X143
3409
2728
1702
CONFIGURATION_147X147
3616
2894
1806
CONFIGURATION_151X151
3832
3067
1914

 

Compact formats can be used to encode short messages in a more efficient manner than full range formats. Note that reader/decoder can autodiscrimanate between both formats.

There are also a set of 256 special formats called "Aztec runes" which can be used for encoding values 0 to 255 for special applications.

 

RAztecCode supports:

 

Installation

 

After unzipping the file you have received or downloaded, the activeX needs to be registered in your windows environment by executing the install.bat file. On windows 7 you must right click the bat file and run it as administrator.

If you want to deinstall the OCX you can do it by means of uninstall.bat.

Boths programs just run the regsvr32.exe windows tool in order to register and unregister OCX's.

The ActiveX has been developed using Visual Basic 6.0. For this reason it needs the following files:

  1. the OCX needs the file Msvbvm60.dll. Make sure the file is available at your PC.
  2. If you use the OCX in other development environment different from Visual Basic, you will also need the file Msstkprp.dll.
Let us know if you need any of these files.
 
 

Examples

The product contains the following examples:

Visual Basic

In the "Examples" subdirectory you will find a visual basic 6.0 project you can use to test the ActiveX. The project is already compiled, you can execute it by means of AztecCodeExample.exe.

 

Use with MSAccess

The ActiveX can be inserted into your MSAccess forms and reports. If want to retrieve a value from the database before you create the barcode you can do it this way:

  1. Place an invisitble text box in the detail band where the barcode resides, and set its Control Source to the approiate field in the database.
  2. In the detail_format event of the report (or form), place the following code: me!NameOfBarCodeControl.CODE=me!MyControlsName

 

Use with ASP

The ActiveX can also be used in your web applications when you use ASP. The following code shows how this can be done:

<%@ LANGUAGE="VBSCRIPT" %>
<%

set bc=server.CreateObject("J4LAztecX.RAztecX")
bc.standalone=true
bc.ModuleSize=3

bc.ProcessTilde = True

bc.ErrorCorrectionLevel = 23


' CONFIGURATION_ANY = 0
' CONFIGURATION_COMPACT = 1
' CONFIGURATION_FULL = 2
bc.ConfigurationType =0

' CONFIGURATION_15X15_COMPACT = 0
' CONFIGURATION_19X19 = 1
' CONFIGURATION_19X19_COMPACT = 2
' CONFIGURATION_23X23 = 3
' CONFIGURATION_23X23_COMPACT = 4
' CONFIGURATION_27X27 = 5
' CONFIGURATION_27X27_COMPACT = 6
' CONFIGURATION_31X31 = 7
' CONFIGURATION_37X37 = 8
' CONFIGURATION_41X41 = 9
' CONFIGURATION_45X45 = 10
' CONFIGURATION_49X49 = 11
' CONFIGURATION_53X53 = 12
' CONFIGURATION_57X57 = 13
' CONFIGURATION_61X61 = 14
' CONFIGURATION_67X67 = 15
' CONFIGURATION_71X71 = 16
' CONFIGURATION_75X75 = 17
' CONFIGURATION_79X79 = 18
' CONFIGURATION_83X83 = 19
' CONFIGURATION_87X87 = 20
' CONFIGURATION_91X91 = 21
' CONFIGURATION_95X95 = 22
' CONFIGURATION_101X101 = 23
' CONFIGURATION_105X105 = 24
' CONFIGURATION_109X109 = 25
' CONFIGURATION_113X113 = 26
' CONFIGURATION_117X117 = 27
' CONFIGURATION_121X121 = 28
' CONFIGURATION_125X125 = 29
' CONFIGURATION_131X131 = 30
' CONFIGURATION_135X135 = 31
' CONFIGURATION_139X139 = 32
' CONFIGURATION_143X143 = 33
' CONFIGURATION_147X147 = 34
' CONFIGURATION_151X151 = 35
bc.PreferredConfiguration = 0


' structured append
' bc.FileId="ABC"
' bc.StructuredAppend = true
' bc.StructuredAppendCounter = 2
' bc.StructuredAppendIndex = 1
bc.Redraw = True

bc.autoconfigurate=true
bc.code="AZTEC TEST"
bc.setSize 3000,3000
bc.saveToBMP("c:\inetpub\wwwroot\barcode")
set bc=nothing

<HTML>
<BODY>
RBARCODEX<BR>
<img src="barcode.bmp">
</BODY>
</HTML>

this script uses RAztecX in order to create a bmp image that can be display in the browser. If you want to use another format (not BMP) you can use external tools for the conversion. The following example uses the JanGraphics freeware library to convert the bmp to a png file:

<%@ LANGUAGE="VBSCRIPT" %>
<%

set bc=server.CreateObject("J4LAztecX.RAztecX")
...... ' like previous example
set bc=nothing

set conv=createobject("janGraphics.Compendium")
conv.convert "c:\inetpub\wwwroot\barcode.bmp","c:\inetpub\wwwroot\barcode.png"
set conv=nothing
%>

Warnning: In some environments you can get the following error:


Microsoft VBScript runtime (0x800A01FB)
An exception occurred: saveToBMP()

this error is produced by a Bug in the file MSVBVM60.dll. We advise you to use version 6.00.0092.0037 , if you cannot get it, contact us and we will send you the correct version.

 

Properties and methods

The activeX RAztec.ocx has following properties and methods:

Methods

Properties

Structured Append properties