RQRCodex ActiveX

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

Introduction

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

 

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 QRCodeExample2.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("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=0

bc.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=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 RQRCode.ocx has following properties and methods:

Methods

Properties