Welcome, Guest
Username: Password: Remember me
Visual Objects

Please use this forum to post questions about Visual Objects and Vulcan.NET
  • Page:
  • 1

TOPIC:

QR Code Generator OCX to suggest? 14 Jul 2020 10:45 #15205

  • Stavros Spanos
  • Stavros Spanos's Avatar
  • Topic Author


  • Posts: 64
  • Hi all

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

    TIA

    Please Log in or Create an account to join the conversation.

    QR Code Generator OCX to suggest? 14 Jul 2020 16:51 #15212

    • ic2
    • ic2's Avatar


  • Posts: 1573
  • Hello Stavros,

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

    groups.google.com/forum/#!topic/comp.lan...-objects/fTRS1C2GL_0

    Dick

    Please Log in or Create an account to join the conversation.

    QR Code Generator OCX to suggest? 14 Jul 2020 20:56 #15214

    • g.bunzel@domonet.de's Avatar


  • Posts: 84
  • Hello Stavros,

    this FoxPro-Class uses a free DLL to create QR-Barcodes:
    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

    Please Log in or Create an account to join the conversation.

    QR Code Generator OCX to suggest? 20 Jul 2020 13:49 #15274

    • Stavros Spanos
    • Stavros Spanos's Avatar
    • Topic Author


  • Posts: 64
  • Gerhard (and) all.

    Many thanks. It helped a lot!

    Please Log in or Create an account to join the conversation.

    QR Code Generator OCX to suggest? 15 Dec 2020 23:16 #16945

    • Jozo
    • Jozo's Avatar


  • Posts: 2
  • 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 ?

    Please Log in or Create an account to join the conversation.

    QR Code Generator OCX to suggest? 16 Dec 2020 09:22 #16947

    • g.bunzel@domonet.de's Avatar


  • Posts: 84
  • Jozo,

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

    Regards

    Gerhard

    Please Log in or Create an account to join the conversation.

    QR Code Generator OCX to suggest? 17 Dec 2020 09:57 #16961

    • Jozo
    • Jozo's Avatar


  • Posts: 2
  • 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.

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1