RMaxiCodeX is an ActiveX control developed using Visual Basic 6.0 and will allow you to create 2 dimensional Maxicode barcodes for your windows applications.
Maxicode is a two-dimensional (2D) and fixed-size matrix symbology which is made up of offset rows of hexagonal modules arranged around a unique finder pattern. The size of Maxicode is 1.11 x 1.054 inches and it can contain up to 93 data characters of information (a total of 144 including error correction codewords).
The symbol was created by United Parcel Service for fast scanning and sorting of packages.RMaxicode supports the following features:
MaxiCode symbols are divided into a primary and a secondary message, each of which contains data and error correction codewords. The primary message is made of 10 codewords and 10 error correction codewords. The primary message is used in mode 2 and 3 to encode the Postal Code, the Service class and the country.
MaxiCode symbols have error correction codewords, based on Reed-Solomon error correction algorithms, which can be used to detect errors and correct erroneous symbols. There are two error levels; standard and enhanced (mode 5).
Modes 2 and 3 are designed for use in the transport industry. They encode the destination address and the class of service as defined by the carrier. Mode 2 uses a 9 digit numeric postal code and mode 3 uses a 6 character alphanumeric postal code. The Service class and the country are both a 3 digit number in both modes.
Mode 4 can encode up to 93 characters or 138 digits. Mode 5 can only encode up to 77 characters but it provides more error correction capabilities (enhanced mode than mode 4.
Mode 6 indicates that the symbol encodes a message used to program the reader system (scanner).
Up to eight MaxiCode symbols may be appended in a structured format. This allows files of data to be represented in up to 8 MaxiCode symbols.
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:
Visual BasicIn 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 MaxicodeExample.exe.
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:
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" %>
bc.Data = "AAA"
bc.Mode =2 ' values 2 to 6
bc.Resolution = 200
bc.ServiceClass = "999"
bc.ZipCode = "B1050"
bc.Country = "056"
bc.ProcessTilde = True
bc.NumberOfCodes = 1
bc.PositionOfCode = 1
this script uses RMaxicodeX 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" %>
...... ' like previous example
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.
- paintBarcode(): forces the barcode to be repainted.
- saveToBMP(filename): saves the barcodes to a BMP file.
- bcBackColor: background color of the barcode.
- bcBarColor: foreground color of the barcode.
- Country: country code (for modes 2 and 3)
- Data: data to be encoded. If the postal code, service class and country are left empyt in mode 2 and 3, they will be extracted from this string as follows:
- If the string begins by [)>RS01GS the following format is expected:
where RS is character number 30 and GS is character number 29
- otherwise the format must be: PostalCodeGSCountryGSServiceGSdata.....
- HHexagon: Height of hexagon modules (pixels).
- L: length of the symbol. The default is 25.5 millimeters.
- Mode: maxicode mode. Values range from 2 to 6
- NumberOfCodes: number of symbol in structured appended mode
- PositionOfCode: number of symbol in structured appended mode
- preferredHeight: returns size needed to draw the barcode.
- preferredWidth: returns size needed to draw the barcode.
- ProcessTilde: the default is value "true". Set it to "false" in order to deactivate the processing of ~.You can use the format ~dNNN if you want to specify the ascii code of the character to be encoded. For example, if you enter the following text in the Data field:
you will actually be encoding
because ~d066 will be replaced with the character ascii character 66, which is B. You must use ~~ in order to encode the ~ character.
- resolution: current resolution of the printer (in dpi) . This is important so that you get the correct size. This values also determines the size of the image you get (in pixels), which printed at the given resolution results in the correct maxicode size ( 1.11 x 1.054 inches).
- serviceclass: service class (modes 2 and 3). In mode 2 it can be an alphanumeric of length 5. In mode 3 can be a numeric of length 9.
- setHexagonPattern: sets a user defined pattern for the hexagons. For example, in a resolution of 8 dots per millimeter:
pattern = Array( Array(0,0,0,0,0,0,0), Array(0,0,0,1,1,0,0), Array(0,0,1,1,1,1,0), Array(0,1,1,1,1,1,1), Array(0,1,1,1,1,1,1), Array(0,1,1,1,1,1,1), Array(0,0,1,1,1,1,0), Array(0,0,0,1,1,0,0), )
you can use the properties HHexagon and WHexagon to find out the size of the pattern in pixels.
- SetSize(width ,height) : size of the barcode image (for exporting). The units for the width and height parameters are twips.
- Standalone: set it to true in asp or vbs files.
- WHexagon: width of hexagon modules (pixels)
- ZipCode: postal code (modes 2 and 3). It can be a numeric value of length 9 (mode 2) or an alphanumeric of length 6 (mode 3).