This project is read-only.

Note: this project has moved to GitHub:

FoxBarcodeQR FoxBarcodeQR

FoxBarcodeQR is a application free software and offers a barcode tool for the Visual FoxPro Community. This is a supplement of FoxBarcode class only for QR Code barcodes.

FoxBarcodeQR use the free library BarCodeLibrary.DLL of Dario Alvarez Aranda (Mexico)

This class is an alternative solution for all developers who requested QR Code support until FoxBarcode natively support the QR Code with gpImage2 class.


Project Manager: VFPEncoding (*)

(*) VFPEncoding are  Guillermo Carrero (RIP) (Barcelona, Spain) and Luis Maria Guayan (Tucuman, Argentina)


Download FoxBarcode Download the latest release of FoxBarcodeQR - v.1.11 - Release 2013.08.24

FoxBarcode FAQs FoxBarcode FAQs



The BarCodeLibrary.DLL library generates functionals QR Codes, but you can only set the type and size of the generated image. No settings supports for error correction level.

The external library

The BarCodeLibrary.DLL library, only have three functions to declare:

  •  LibraryVersion: Returns a string with the version of the library.
  •  SetConfiguration: A method to set the size and type of image file to generate.
  •  GenerateFile: This method is responsible for generating the image of the QR Code.


FoxBarcodeQR encapsulates BarCodeLibrary.dll library functions into a single method called QRBarcodeImage(), which receives the following parameters:

  •  tcText: Text to encode
  •  tcFile: Name the image file to generate. If none is specified, it generates a random file name in the Windows temporary files folder.
  •  tnSize: The size of the generated image. Receives an integer between 2 and 12
    • 2 = 66 x 66 (in pixels)
    • 3 = 99 x 99
    • 4 = 132 x 132
    • 5 = 165 x 165
    • 6 = 198 x 198
    • 7 = 231 x 231
    • 8 = 264 x 264
    • 9 = 297 x 297
    • 10 = 330 x 330
    • 11 = 363 x 363
    • 12 = 396 x 396
  •  tnType: The type of the generated image file. Receives an integer between 0 and 2.
    • 0 = BMP
    • 1 = JPG
    • 2 = GIP

And returns the file path of the bar code image generated.


The following example creates a image of a QR Code barcode from a size 6 (198 x 198 pixels) and PNG type.


*--- Create FoxBarcodeQR object and QR Code barcode image<
LOCAL loFbc, lcQRImage
loFbc = CREATEOBJECT("FoxBarcodeQR")
lcQRImage = loFbc.QRBarcodeImage("",,6,2)

FoxBarcodeQR example

To include a barcode on a report, you must insert an Image object and set the property with a call ControlSource QRBarcodeImage() method and is recommended to set "contents Scale, Retain shape" if the image size differs from the frame.

FoxBarcodeQR report

Important: Before you run the report and create the object FoxBarcode, you must declare the variable as PRIVATE so that it has scope in the report, as follows:

*--- Create FoxBarcodeQR private object
m.poFbc = CREATEOBJECT("FoxBarcodeQR")


The only files needed to be distributed to FoxBarcodeQR function properly are:

  • FoxBarcodeQR.prg
  • BarCodeLibrary.dll

Notes on the distribution and installation of BarCodeLibrary.dll file:

BarCodeLibrary.dll file not register. It must be in the same folder as the application or in the Windows System folder.

BarCodeLibrary.dll was tested and runs on Windows XP, 7 and 8 (32 and 64 bits)


To my friend Guillermo from heaven illuminated me with this supplement to our class FoxBarcode.

Last edited Sep 17, 2017 at 7:14 PM by DougHennig, version 4


aderitojustino Jul 17, 2017 at 4:15 PM 
There is a way to generate more than 256 characteres in the Qr Code?

muralinarayan Nov 28, 2016 at 8:36 AM 
Dear All,
I had posted before also my requirement & nobody had answered.
Now my request is can anybody please develop this for a fee as I am stuck badly in a government project because of this.

I have to encode 4 fields into the qr code sample is given below:



DOB / जन्म की तारीख : DD/MM/YYYY - Date of Incorporation / Formation / निगमन/गठन की तारीख

I need the legend to include the hindi words I can manage only English words.
The variable data can be provided in a text format or a dbf format.
I need to save the image according to a specific naming convention to a specific folder for each file.

I heard that this is possible in .NET unfortunately I have little to no knowledge in this area.

A dll or activex component would be preferred.

Kindly help me in this matter urgently.

Murali Narayanan

ponadd Nov 25, 2016 at 3:25 AM 
how to change charaters set

dhbart Jan 6, 2014 at 6:35 PM 
There is a way to generate more than 256 characteres in the Qr Code?

andylauxing Jun 16, 2013 at 12:17 PM 
I'm sorry, i see ,it support chinese charaters

andylauxing Jun 16, 2013 at 8:44 AM 
i test the project ,but not support chinese,.
how to do for chinese? thks.