Generar Código QR
Publicado por Adolfo (271 intervenciones) el 17/09/2021 01:12:27
Por si necesitan generar código QR en PB es mas sencillo de lo que parece.
Primero declaramos 2 Funciones globales externas(la segunda FullQRCode es opcional, yo no la utilizo pero se las dejo):
Para el botón Generar QR:
Para el botón FULL QR:

Primero declaramos 2 Funciones globales externas(la segunda FullQRCode es opcional, yo no la utilizo pero se las dejo):
1
2
Function Boolean FastQRCode(String Texto,String FileName) Library "QRCodeLib.dll" ALIAS FOR "FastQRCode;Ansi"
Function Boolean FullQRCode(Integer AutoConfigurate,Integer AutoFit,Long Back, Long BarColor,String Texto,Integer CorrectionLevel,Integer Encoding,Integer MarginPixels,Integer ModuleWidth,Integer Heig,Integer Widt,String FileName) Library "QRCodeLib.dll" ALIAS FOR "FullQRCode;Ansi"
Para el botón Generar QR:
1
2
3
FileDelete("CodigoQR.bmp")
FastQrCode(sle_dato.text,"CodigoQR.bmp")
p_code.picturename = "CodigoQR.bmp"
Para el botón FULL QR:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Long ll_backcolor
Integer li_corrlevel, li_encoding, li_margin, li_modwith
FileDelete("CodigoFull.bmp")
if rb_blanco.checked then ll_backcolor = 16777215
if rb_amarillo.checked then ll_backcolor = 65535
if rb_azul.checked then ll_backcolor = 16728833
li_corrlevel = 1
li_encoding = 1
li_margin = 1
li_modwith = 10
FullQRCode(1,1,ll_backcolor,0,sle_dato.text,li_corrlevel,li_encoding,li_margin,li_modwith,400,400,"CodigoFull.bmp")
p_code2.picturename = "CodigoFull.bmp
- qrcodelib.rar(173,1 KB)
Valora esta pregunta


1