Print QR Codes

I need to print QR Code on a system written in VFP. Is it possible?

Translate from portuguese:

"Eu preciso imprimir QR Code em um sistema escrito em VFP. É possível?"
etm_wklAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
CaptainCyrilConnect With a Mentor Founder, Software Engineer, Data ScientistCommented:
http://www.downloadatlas.com/free-to-try-ef11b855.html

I found these online. Never tried them.
0
 
etm_wklAuthor Commented:
Thank you.
I downloaded the ActiveX ( MW6 ) and headed e-mail requesting the examples in VFP, 2 times (yesterday and today), and I'm still waiting for some feedback.
Notice anything new.

Translate from portuguese:

"Obrigado.
Fiz o download do ActiveX ( MW6 ) e encaminhei e-mail solicitando os exemplos em VFP, por 2 vezes ( ontem e hoje ), e ainda estou aguardando por algum retorno.
Aviso qualquer novidade.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
CaptainCyrilFounder, Software Engineer, Data ScientistCommented:
I Googled QR Codes and pasted the links above. I never actually used bar codes or QR codes in my code.
0
 
Olaf DoschkeSoftware DeveloperCommented:
You can't expect sample code in VFP. No ActiveX is programmed IN VFP, only few companies actually also know VFP and provide ActiveXes especially tested with, approved with VFP and handing out sample code.

But the ActiveX documentation of it's properties and methods should suffice for using it.

I expect not much more than a line of code needed, something like:

oleobject.CreateQRCode("your barcode value here","qrimage.gif")

And you need a foxpro sample for that?

Have you used any ActiveX in VFP so far? Do you have a general question obout the olecontrol baseclass of VFP?

Bye, Olaf.
0
 
CaptainCyrilFounder, Software Engineer, Data ScientistCommented:
I agree with Olaf, most of the ActiveX we used had little documentation so we had to experiment with it.
0
 
etm_wklAuthor Commented:
OK, thanks.

On the company website where I downloaded the Activex, say they can send VFP examples when prompted. So I have sent the emails cited.

Another point: in fact, I have no experience in the use of ActiveX. But I'll try.


Translate from portuguese:

"OK, obrigado.

No site da empresa de onde baixei o Activex, dizem que podem encaminhar exemplos em VFP quando solicitado. Daí eu ter enviado os emails citados.

Outro ponto: de fato, não tenho nenhuma experiencia no uso de Activex. Mas vou tentar."
0
 
CaptainCyrilFounder, Software Engineer, Data ScientistCommented:
You just need to install the ActiveX control. And just like using a textbox or commandbox on your form, you can use this ActiveX with intellisense of methods and properties. Professional companies have adequate documentation on their methods and properties.
0
 
Olaf DoschkeSoftware DeveloperCommented:
Cyril is right, not much more needed than installation and putting the ActiveX control on a form lilke any other control.

Even though it is not a visual control like a textbox, this can be done.

There are several ways to get at the ActiveX control, perhaps the easiest is to add the olecontrol control and then choose the ActiveX control from the dialog appearing.

You can also add ActiveX controls to the Toolbox or the Form Controls Toolbar.

Besides this, some non visual ActiveX Controls can also be instanciated via Createobject() and their OLE Classname, the same as OLE automation servers. It's all OLE/COM.

Bye, Olaf.
0
 
etm_wklAuthor Commented:
I received the following sample code and it worked.

Drop table barcode
*
Create table barcode (img g)
*
fileName = ""
*
For n = 1 to 15
      *
      fileName = "c:\qrcode_" + alltrim(str(n, 2, .0)) + ".bmp"
      *
      ThisForm.QRCodeObj.SetSize(300, 300)
      *
      With ThisForm.QRCodeObj
            *
            .Data = "String " + alltrim(str(n, 2, .0))
            .Refresh
            .SaveAsBMP(fileName)
            *
      EndWith
      *
      Insert Into barcode from MEMVAR
      *
      Append General barcode.img From (fileName)
      *
Next
*

Thanks to all.
0
 
CaptainCyrilFounder, Software Engineer, Data ScientistCommented:
Welcome. It is easy, no? Glad it worked out great. :-)
0
 
Olaf DoschkeSoftware DeveloperCommented:
Hm,

that kind of interface is a bit weird, but OK. Essentially the steps to do with the QRCode object are

.SetSize(300, 300)
.Data = "String ..."
.Refresh
.SaveAsBMP(fileName)

That could also be put in a single method call
.CreateQRCodeBMP(data,sizex,sizey,filename)

The seperation enables you to only set the size once outside of the loop. Having x and y size makes me wonder if there are any non quadratic QR codes, I haven't seen any such.

But it works and that's what matters, isn't it. Glad you got it working.

Bye, Olaf.
0
All Courses

From novice to tech pro — start learning today.