Solved

Print QR Codes

Posted on 2012-03-15
12
1,658 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

Expert Comment

by:CaptainCyril
Comment Utility
0
 
LVL 27

Accepted Solution

by:
CaptainCyril earned 500 total points
Comment Utility
http://www.downloadatlas.com/free-to-try-ef11b855.html

I found these online. Never tried them.
0
 

Author Comment

by:etm_wkl
Comment Utility
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
 
LVL 27

Expert Comment

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

Expert Comment

by:Olaf Doschke
Comment Utility
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
Comment Utility
I agree with Olaf, most of the ActiveX we used had little documentation so we had to experiment with it.
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:etm_wkl
Comment Utility
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
Comment Utility
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 29

Expert Comment

by:Olaf Doschke
Comment Utility
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
Comment Utility
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
Comment Utility
Welcome. It is easy, no? Glad it worked out great. :-)
0
 
LVL 29

Expert Comment

by:Olaf Doschke
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
HOW TO: Upload an ISO image to a VMware datastore for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere Host Client, and checking its MD5 checksum signature is correct.  It's a good idea to compare checksums, because many installat…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now