RQRCode is an ActiveX control developed using Visual Basic 6.0 and will allow you to create 2 dimensional QRCode barcodes for your windows applications.
The QRCode following features are supported
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 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 QRCodeExample2.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" %>
<%set bc=server.CreateObject("J4LQRCodeX.RQRCodeX")
bc.standalone=true
bc.ModuleSize=3' ENC_ALPHA = 0
' ENC_BYTE = 1
' ENC_NUMERIC = 2
' ENC_KANJI = 3
' ENC_AUTO = 4
bc.encoding=0bc.preferredVersion=1 ' values 1 to 40
' CORRECTION_LEVEL_L = 0
' CORRECTION_LEVEL_M = 1
' CORRECTION_LEVEL_Q = 2
' CORRECTION_LEVEL_H = 3
bc.errorcorrectionlevel=1
' FNC1_MODE_NO = 0
' FNC1_MODE_FIRST = 1
' FNC1_MODE_SECOND = 2
bc.fnc1mode=0
bc.autoconfigurate=true
bc.code="QRCODE 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 RQRCodeX 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("J4LQRCodeX.RQRCodeX")
...... ' like previous example
set bc=nothingset 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.
Methods
- paintBarcode(): forces the barcode to be repainted.
- saveToBMP(filename): saves the barcodes to a BMP file.
Properties
- ApplicationIndicator. used only if FNC1 mode is FNC1_MODE_SECOND .
- AutoConfigurate: set it to true to select a larger barcode version (see preferredVersion) if the amount of data requires it.
- Code: this is the value to be encoded.
- CodeBinary: value to be encoded (as an array of Integer values). It will be used only if the property useBinary is true.
- ECI: extended channel interpretation identifier.
- ErrorCorrectionLevel: Four levels of error correction recovery are defined in QR Code:
- CORRECTION_LEVEL_L = 0 ( 7 % )
- CORRECTION_LEVEL_M = 1 ( 15 % )
- CORRECTION_LEVEL_Q = 2 ( 25% )
- CORRECTION_LEVEL_H = 3 ( 30% )
- Encoding: valid encoding algorithms are:
- ENC_ALPHA = 0: encodes alphanumeric characters (digits 0 - 9; upper case letters A -Z; nine other characters: space, $ % * + - . / : ); )
- ENC_BYTE = 1: encodes binary values ( 8-bit data)
- ENC_NUMERIC = 2: encodes numeric values only (digits 0-9)
- ENC_KANJI = 3: encodes Kanji characters. Kanji characters in QR Code can have values 8140 -9FFC and E040 - EBBF
- ENC_AUTO = 4: automatic seleccion of the encoding algorithm
- Fnc1Mode:
- FNC1_MODE_NO = 0 (default)
- FNC1_MODE_FIRST = 1. This Mode Indicator identifies symbols encoding data formatted according to the UCC/EAN Application Identifiers standard.
- FNC1_MODE_SECOND = 2. This Mode Indicator identifies symbols formatted in accordance with specific industry or application specifications previously agreed with AIM International. It is immediately followed by a one-byte codeword the value of which is that of the Application Indicator assigned to identify the specification concerned by AIM International.
- paintedWidth (readonly): real size of the barcode. The value is set after the barcode is painted. Can be use to create an image of the exact size.
- paintedHeight (readonly): real size of the barcode. Can be use to create an image of the exact size.
- PreferredVersion: Size (version) of the barcode , it can be any value between 1 and 40. If the autoconfigurate option is active a larger version will be automatically selected if the amount of data requires it. The symbol size can be 21 * 21 modules to 177 * 177 modules (Versions 1 to 40, increasing in steps of 4 modules per side).
- processTilde: process the " ~ " in the string to be encoded
~dNNN represents the ascii character encoded by the 3 digits NNN. For exmaple, ~d065 represents the character 'A'.
- qrBackColor: back color of the barcode.
- qrBarColor: color of the bars.
- margin: margin in pixels (default is 30).
- ModuleSize: size in pixels of the dots in the barcode
- Redraw: set it to true to force a repaint of the barcode
- 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.
- StructuredAppend: set it to true to enable the structured append mode.
- StructuredAppendIndex: index of the barcode within the structured append sequence.
- StructuredAppendTotal: number of symbols (barcodes) in the structured append sequence.
- useBinary: set it to true in order to encode the content of the codeBinary property.