[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Print QR Codes

Posted on 2012-03-15
12
Medium Priority
?
1,982 Views
Last Modified: 2012-03-26
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?"
0
Comment
Question by:etm_wkl
  • 6
  • 3
  • 3
12 Comments
 
LVL 27

Accepted Solution

by:
CaptainCyril earned 2000 total points
ID: 37725127
http://www.downloadatlas.com/free-to-try-ef11b855.html

I found these online. Never tried them.
0
 

Author Comment

by:etm_wkl
ID: 37729297
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 27

Expert Comment

by:CaptainCyril
ID: 37729663
I Googled QR Codes and pasted the links above. I never actually used bar codes or QR codes in my code.
0
 
LVL 30

Expert Comment

by:Olaf Doschke
ID: 37732329
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
 
LVL 27

Expert Comment

by:CaptainCyril
ID: 37732357
I agree with Olaf, most of the ActiveX we used had little documentation so we had to experiment with it.
0
 

Author Comment

by:etm_wkl
ID: 37732455
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
 
LVL 27

Expert Comment

by:CaptainCyril
ID: 37733082
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
 
LVL 30

Expert Comment

by:Olaf Doschke
ID: 37733596
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
 

Author Closing Comment

by:etm_wkl
ID: 37741874
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
 
LVL 27

Expert Comment

by:CaptainCyril
ID: 37742080
Welcome. It is easy, no? Glad it worked out great. :-)
0
 
LVL 30

Expert Comment

by:Olaf Doschke
ID: 37764604
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

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
Sometimes MS breaks things just for fun... In Access 2003, only the maximum allowable SQL string length could cause problems as you built a recordset. Now, when using string data in a WHERE clause, the 'identifier' maximum is 128 characters. So, …
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question