Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

Print QR Codes

Posted on 2012-03-15
12
Medium Priority
?
1,923 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
Here in this article, you will get a step by step guidance on how to restore an Exchange database to a recovery database. Get a brief on Recovery Database and how it can be used to restore Exchange database in this section!
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

649 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