QR code

Post Reply
User avatar
Blessed
Posts: 243
Joined: Wed Sep 19, 2007 4:32 pm
Location: Honduras, C.A.
Contact:

QR code

Post by Blessed »

Hello everyone.
In my country is requiring PC printed bills are adding a QR code.
Anyone know how to start something.
_ A. Martinez
http://www.multisofthn.com
Honduras, Centro America
xHarbour Enterprise 1.2.2, Fivewin 13.06
User avatar
Roger Seiler
Posts: 223
Joined: Thu Dec 01, 2005 3:34 pm
Location: Nyack, New York, USA
Contact:

Re: QR code

Post by Roger Seiler »

What is a QR code?
User avatar
Willi Quintana
Posts: 859
Joined: Sun Oct 09, 2005 10:41 pm
Location: Cusco - Perú
Contact:

Re: QR code

Post by Willi Quintana »

Hi, use this code......
/--------------------------------------------------------------------------------------------------
Function QRGenerator(cTexto, cPath, cBmp) // genera codigo qr
local cStr, cFile
LOCAL nResp

#Define DC_CALL_STD 0x0020

STATIC qrDLL

DEFAULT cPath := "BMP\"
DEFAULT cBmp := "QR.bmp"
DEFAULT cTexto := "SVITE SOFTWARE ADMINISTRATIVO"

IF !FILE("QRCodelib.Dll")
MsgStop("Sin Librería de Soporte","Improcedente")
Return(NIl)
EndIF

cStr := cTexto //"Texto a QR Code"
cFile := cPath + cBmp

qrDLL:=LoadLibrary("QRCodelib.Dll" )
nResp:=DllCall(qrDLL,DC_CALL_STD,"FastQRCode",cStr,cFile)
FreeLibrary(qrDLL)

RETURN (cFile)
User avatar
Blessed
Posts: 243
Joined: Wed Sep 19, 2007 4:32 pm
Location: Honduras, C.A.
Contact:

Re: QR code

Post by Blessed »

Roger
Here a detail of QR Codes
http://marksprague.wordpress.com/qr-cod ... -qr-codes/

Willy thanks for replying.
I have seen that there is a range of variants QRCodelib.Dll
And I found are extra, which you are using?
To avoid falling into bad experiences or headaches?
_ A. Martinez
http://www.multisofthn.com
Honduras, Centro America
xHarbour Enterprise 1.2.2, Fivewin 13.06
User avatar
Blessed
Posts: 243
Joined: Wed Sep 19, 2007 4:32 pm
Location: Honduras, C.A.
Contact:

Re: QR code

Post by Blessed »

thanks

I found this same example, the forum fivewin brasil
http://fivewin.com.br/index.php?/topic/ ... resolvido/

And there's the download link QRCodelib.Dll
http://www.oho.com.br/fw/qr.zip
_ A. Martinez
http://www.multisofthn.com
Honduras, Centro America
xHarbour Enterprise 1.2.2, Fivewin 13.06
User avatar
Daniel Garcia-Gil
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita
Contact:

Re: QR code

Post by Daniel Garcia-Gil »

Hello

Harbour support QR code without use any DLL, locate in contributions "zebra"
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
FiveWiDi
Posts: 910
Joined: Mon Oct 10, 2005 2:38 pm

Re: QR code

Post by FiveWiDi »

Daniel Garcia-Gil wrote:Hello

Harbour support QR code without use any DLL, locate in contributions "zebra"
Daniel,
Sabes si hay algun ejemplo en la versión que se distribuye de Fivewin?
Se pueden consultar algun ejemplo en algún lugar?
Que LIB se debe lincar la aplición?

Gracias,
Un Saludo
Carlos G.

FiveWin 19.06 + Harbour 3.2, BCC 7 Windows 10
User avatar
vensanto
Posts: 54
Joined: Thu Oct 13, 2005 1:26 pm
Location: ITALIA
Contact:

Re: QR code

Post by vensanto »

Ciao
questa è la funzione che utilizzo per stampare il QRCode
spero vi possa essere utile

===

#Include "FiveWin.ch"

* richiede la libreria HBZEBRA.LIB

* *********************************************************
* PROCEDURE MAIN
* PRINT oPRN PREVIEW
* PAGE
* EanQRCode(oPRN,50,50,1,"www.veneziasoft.com")
* ENDPAGE
* ENDPRINT
* RETURN
* *********************************************************

* iFlags = estratto da QRCODE.C della libreria HBZEBRA.LIB
*
* #define HB_ZEBRA_FLAG_QR_LEVEL_MASK 0x0700
* #define HB_ZEBRA_FLAG_QR_LEVEL_L 0x0100
* #define HB_ZEBRA_FLAG_QR_LEVEL_M 0x0200
* #define HB_ZEBRA_FLAG_QR_LEVEL_Q 0x0300
* #define HB_ZEBRA_FLAG_QR_LEVEL_H 0x0400
*
* switch( iFlags & HB_ZEBRA_FLAG_QR_LEVEL_MASK )
* {
* case HB_ZEBRA_FLAG_QR_LEVEL_M:
* iLevel = 1;
* break;
* case HB_ZEBRA_FLAG_QR_LEVEL_Q:
* iLevel = 2;
* break;
* case HB_ZEBRA_FLAG_QR_LEVEL_H:
* iLevel = 3;
* break;
* default:
* iLevel = 0;
* break;
*

* *********************************************************
* EanQRCode(oPRN, nY, nX, nWidth, nQRCODE, nColor, iFlags)
*
* oPRN = Output Device
* nY = Rigo di inizio stampa
* nX = Colonna di inizio stampa
* nWidth = Spessore del QRCODE - default = 1
* nQRCODE = Stringa del QRCODE
* nColor = Colore del QRCODE - default = CLR_BLACK
* iFlags = Flags
*
* *********************************************************

******************************************************************
Function EanQRCode(oPRN, nY, nX, nWidth, nQRCODE, nColor, iFlags)
Local hCODE,oBRUSH,nRET
Local nCLR:=IIF(nColor<>NIL,nColor,CLR_BLACK)
Local nLineWidth:=IIF(nWidth==NIL .OR. nWidth<1,1,nWidth)
Local nLineHeight:=nLineWidth
Local nSCALE:=7.2

hCODE:=hb_zebra_create_qrcode(nQRCODE,iFlags)

nY *= nSCALE
nLineWidth *= nSCALE

IF hCODE != NIL

IF hb_zebra_geterror( hCODE ) == 0

IF Empty( nLineHeight )
nLineHeight := 16
ENDIF

IF hb_zebra_geterror( hCODE ) != 0
RETURN HB_ZEBRA_ERROR_INVALIDZEBRA
Endif

DEFINE BRUSH oBRUSH COLOR nCLR
nRET:=hb_zebra_draw( hCODE, {|x,y,w,h| oPRN:FillRect({Int(y+.5), Int(x+.5), Int(y+.5)+Int(h)+1, Int(x+.5)+Int(w)},oBRUSH) }, nX*nSCALE, nY, nLineWidth, nLineHeight*nSCALE )
oBRUSH:End()

Endif
hb_zebra_destroy( hCODE )

Endif
Return nRET

===

Saluti

Santo Venezia
Romeo
Posts: 328
Joined: Thu Jan 25, 2007 3:53 pm
Location: Milan (Italy)

Re: QR code

Post by Romeo »

Ottima funzione, molto utile !

E' possibile stampare il QRCode anche nei Report oltre che nelle printer


***
Good function to print a QrCode in oprn:...

Is it possible to print the QrCode also in a report ?


Grazie

Romeo/Zngoni
Jilo1234
Posts: 2
Joined: Sat Jan 28, 2017 5:08 am

Re: QR code

Post by Jilo1234 »

Hola estoy buscando una aplicacion que me pueda sacar el codigo qr de algun texto.
Quisiera saber si alguien tiene una app ya compilada y su codigo fuente en fwh que pudiera proporcionarme.

Mi correo: manuelantonio960504@gmail.com
User avatar
richard-service
Posts: 583
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan
Contact:

Re: QR code

Post by richard-service »

Hi

How to read QR code data?
Regards,

Richard

Harbour 3.2.0dev (r1904111533)/xHarbour 1.2.3 Intl. (SimpLex) (Build 20180818) => Borland C++ v7.4
xHarbour 0.99.71 (SimpLex) => Borland C++ v5.5
MySQL v5.7 /ADS v12
Harbour 3.2.0dev (r1603181642) => Borland C++ v7.4 64bit
User avatar
MarcoBoschi
Posts: 925
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Re: QR code

Post by MarcoBoschi »

richard

In android I use barcode scanner
https://github.com/zxing/zxing

It works fine!
bye
Marco Boschi
info@marcoboschi.it
User avatar
MarcoBoschi
Posts: 925
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Re: QR code

Post by MarcoBoschi »

Romeo,
Since I still use ReportPro in my programs I create a bmp file containing image of qrcode in a subfolder and from report I create an object
Picture source "File Name returned from an expression"
For instance in my table of articles there is a field named qrcode


Bye
Marco Boschi
info@marcoboschi.it
Post Reply