QR Code Generator OCX to suggest?

Public support forum for peer to peer support with related to the Visual Objects and Vulcan.NET products
Post Reply
User avatar
Stavros Spanos
Posts: 115
Joined: Thu Nov 12, 2015 4:59 pm
Location: Greece

QR Code Generator OCX to suggest?

Post by Stavros Spanos »

Hi all

Has anybody experiance with a good QR Code generator OCX for VO?

TIA
ic2
Posts: 1856
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

QR Code Generator OCX to suggest?

Post by ic2 »

Hello Stavros,

Look back a bit further in comp.lang.clipper.visual-objects where you posted the message as well:

https://groups.google.com/forum/#!topic ... TRS1C2GL_0

Dick
g.bunzel@domonet.de
Posts: 97
Joined: Tue Mar 01, 2016 11:50 am
Location: Germany

QR Code Generator OCX to suggest?

Post by g.bunzel@domonet.de »

Hello Stavros,

this FoxPro-Class uses a free DLL to create QR-Barcodes:
https://github.com/VFPX/FoxBarCodeQR

You can use the free BarCodeLibrary from that download with VO. No registration needed - that dll only has to be in the EXE-Path.

To use that dll with VO:
_DLL FUNCTION GenerateFile (cData AS PSZ, cFileName AS PSZ) AS INT PASCAL:BarCodeLibrary.GenerateFile
_DLL FUNCTION SetConfiguration (nSize AS INT, nImageType AS INT) AS INT PASCAL:BarCodeLibrary.SetConfiguration
_DLL FUNCTION LibraryVersion () AS PSZ PASCAL:BarCodeLibrary.LibraryVersion


To create your QR-Code:

SetConfiguration (4, 1))
GenerateFile (String2Psz("Das ist ein Mustertext mit QR-Code"), String2Psz("QR_Muster.jpg"))

/****
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 = PNG
********/


HTH

Gerhard Bunzel
User avatar
Stavros Spanos
Posts: 115
Joined: Thu Nov 12, 2015 4:59 pm
Location: Greece

QR Code Generator OCX to suggest?

Post by Stavros Spanos »

Gerhard (and) all.

Many thanks. It helped a lot!
User avatar
Jozo
Posts: 3
Joined: Fri Jul 21, 2017 1:34 pm

QR Code Generator OCX to suggest?

Post by Jozo »

Hello Gerhard,
I like this example. Do you have declarations for using QRCodeLib.dll? I tried to do something but I failed.
By the way, I looked at an example in Fox where an object is instantiated and used. Do you perhaps have a similar example for VO ?
g.bunzel@domonet.de
Posts: 97
Joined: Tue Mar 01, 2016 11:50 am
Location: Germany

QR Code Generator OCX to suggest?

Post by g.bunzel@domonet.de »

Jozo,

in my post is all you need: DLL-Wrapper and Sample.
What do you need more?

Regards

Gerhard
User avatar
Jozo
Posts: 3
Joined: Fri Jul 21, 2017 1:34 pm

QR Code Generator OCX to suggest?

Post by Jozo »

Hello Gerhard,
First, thank you to your post for using the BarCodeLibrary.dll library and the GenerateFile, SetConfiguration and LibraryVersion functions is very clear as you wrote it yourself. You also wrote a DLL-Wrapper and an example for that case.
The first thing I wanted were DLL-Wrapper for QRCodeLib.dll and the QRCodeLibVer, FastQRCode and FullQRCode functions. I tried to make them quickly but I didn't succeed and I thought if you have them I shouldn't suffer ... I understand the example in fox in principle, but until I realized what it was about, I spent half a day. From the example I misunderstood that I need a DLL-wrapper for the class ... and so ... I analyzed the code and in the end I succeeded:

_DLL FUNCTION QRCodeLibVer () AS PSZ PASCAL:QRCodeLib.QRCodeLibVer
_DLL FUNCTION FastQRCode (cData AS PSZ, cFileName AS PSZ) AS INT PASCAL:QRCodeLib.FastQRCode
_DLL FUNCTION FullQRCode ( lAutoC AS INT, ;
lAutoF AS INT, ;
nBackC AS LONG, ;
nBarC AS LONG, ;
cData AS PSZ, ;
nCL AS INT, ;
nEnc AS INT, ;
nMP AS INT, ;
nMW AS INT, ;
nH AS INT, ;
nW AS INT, ;
cFileName AS PSZ) AS INT PASCAL:QRCodeLib.FullQRCode

Both examples result in an image that the application saves to a folder. I would read the image and save it in DIB format and print it on a pos printer. Another thing I wanted was an example that would allow me to instantiate the FoxBarcodeQR class and create a QR code image object that I would use without saving to disk. In the Fox example I saw that this object can be accessed by instantiating a class but I realized that I can't do this from VO since there is no such possibility in dlls or I don't have enough knowledge for such possibility.
I now have a solution for printing a QR code on a pos printer via esc sequences and printing an image generated by a QR code generator. I still have to solve printing through ReportPro on other printers. I can solve this relatively easily by generating an image and printing that image in ReportPro but only one account at a time. I have an example from Phil that generates a set of letters and prints them over the font in ReportPro. Still I would like some solution in ReportPro without fonts.
Post Reply