In nayuki's live demo, there is an option to set the border (width) - measured in QR code 'bits' as the unit.
I've looked through your implementation for 'border'. But can't find any reference or setting.
Can you give me any hints as to passing a parameter to set the border width.
Thx, Alan
In nayuki's live demo, there is an option to set the border (width) - measured in QR code 'bits' as the unit.
I've looked through your implementation for 'border'. But can't find any reference or setting.
Can you give me any hints as to passing a parameter to set the border width.
Thx, Alan
No, this is not implemented. You have to manually place the QR Code so that there is enough margin as you deem proper.
Most scanners are able to read QR Codes (and barcodes) with no margins at all so the standard requirements for empty borders around the image are optional in practice and mostly not heeded by anyone printing QR Codes/barcodes on paper.
Hi,
I have a little problem with this QR code generator library. I'm using Access 2016 (I think it's use VB 7.1) and can not compile the code, always show this error message: Compile error: User-definied type not definied.
What can I do? Attachment 189235
You can start by sharing some more info about this error.
Which line number is this error at? Is you Office installation 32-bit or 64-bit version?
cheers,
</wqw>
Access 2016 64 bit version, on Windows 10 22H2.
As you see on the attached screenshot, the Editor select from the line 169 to 177 the Public Function QRCodegenBarcode() segment.
Can you upload/post here a generated QR barcode which contains problematic spanish special symbols?
I think it is a problem with the regional configuration of my Windows. I'm trying to upload an image.
I edit the post, sorry. My windows regional settings are ok, because all keys of my keyboard work correctly and I can type things like "camión español"
Last edited by imasred; Jan 8th, 2024 at 01:22 PM.
The QR reader you are using does not recognize UTF-8 encoding and switches to some crazy japanese kanji or whatever encoding QR code originally used. The fun fact is that QR codes *predate* UTF-8 so these cannot possible originally use UTF-8 and solve most of their enconding issue so they had to mess up with encoding which ended not so good and most reader implementations are needlessly complicated. Nowadays most everyone silently assumes input stream is proper UTF-8 encoded text unless explicitly configured to use kanji chartacter sets and whatever.
Well, at least now you seen some kanji japanese letters which is got in place of spanish special characters :-)) This is not so common to see, an ordinary Unicode mess up ends up in some form of Chineese only :-))
The problem is in the configuration of your phone's QR code reader, not in your phone per se. You can fix it but switching a setting to always use UTF-8 most probably, unfotunately specifics of where and what are not available here. . .
Hi,
Is it possible to generate Datamatrix code with this program?
thank you
I think this project only creates QR Codes, to create other type of BarCodes you can try the attached project, thats creates more code bars types, including DataMatrix.
I think this project only creates QR Codes, to create other type of BarCodes you can try the attached project, thats creates more code bars types, including DataMatrix.
Btw, this sample uses ZXing library as an external dependacy which is a Java behemoth. The library can appraently produce QR Codes too among many other formats *and* its primary target is actually scanning barcodes it seems.
Btw, this sample uses ZXing library as an external dependacy which is a Java behemoth. The library can appraently produce QR Codes too among many other formats *and* its primary target is actually scanning barcodes it seems.
cheers,
</wqw>
Yes, and the sample also allows scan barcodes from files
Yes, and the sample also allows scan barcodes from files
Honestly hope that no one in his right mind decides it's a good idea to use a Java library for about anything and tirelessly search for replacement using *any* other technology (even .Net).
This thread is about being and staying lean, using less code, particularly with small VBx modules, with no dependencies to produce usable and performant solutions.
I think this project only creates QR Codes, to create other type of BarCodes you can try the attached project, thats creates more code bars types, including DataMatrix.
Thanks, but I can't use it in my Access 2016 database and yes, it's too big for me.
I need searching another solution, which is "simple" VB6 code without any external DLL, ActiveX, etc.
Very nice code !
I made a small modification: I transformed the LNG_STEP constant into a variable to be able to modify the size of the QR code and copy it to the clipboard.
This then makes it possible to insert it into a Word document, for example, or any other application...
Dim Pic As StdPicture
Set Pic = QRCodegenBarcode(Text1.Text, 0, QRCodegenEcc_LOW, 1, 5, , , HScroll1.Value)
'SavePicture Pic, App.Path & "\123.emf" 'it's not bmp format
how to save as bmp,without picture1 control?
SavePicture GetQrCodePic("https://www.vbforums.com", 500), App.Path & "\test4.bmp"
Function GetQrCodePic(Txt As String, Width As Long) As StdPicture
Dim baBarCode() As Byte
Dim lQrSize As Long
Dim lModuleSize As Long
If QRCodegenEncode(Txt, baBarCode) Then
lQrSize = QRCodegenGetSize(baBarCode)
'lModuleSize = Int((Image1.Width * 15) / (lQrSize * Screen.TwipsPerPixelX) + 0.5)
lModuleSize = Int((Width * 15) / (lQrSize * Screen.TwipsPerPixelX) + 0.5)
Set GetQrCodePic = QRCodegenResizePicture(QRCodegenResizePicture(QRCodegenConvertToPicture(baBarCode, vbBlack, ModuleSize:=lModuleSize, SquareModules:=False), Width * 4, Width * 4), Width, Width)
Erase baBarCode
End If
End Function
Last edited by xiaoyao; Jun 18th, 2024 at 06:10 AM.
The edge of your PrictureBox is controlled by Border property of the PictureBox control, it has nothing to do with lModuleSize = Int((Image1.Width * 15) / (lQrSize * Screen.TwipsPerPixelX) + 0.5) code you are citing.
> Now that the function is normal, is there any way for him to generate a QR code full of squares, instead of rounding it?
You are calling the procedure with SquareModules:=False, what do you expect? Did you try SquareModules:=True?
Edit: Take your time to run and research the test project in test subdirectory before asking more questions, please. Most everything you asked so far is implemented there.
Sorry, I currently cannot help you because the comminucation loss is severe. If this module does not work ok for you just find something else to produce QR Codes with.
At the beginning, the VB QR module can be used to export the two-dimensional code image, but after saving, it is very small, maybe only 30 X 30 pixels. I don't know how to enlarge it. It took me a lot of time to find a way to enlarge it. Thanks very much.
Last edited by Shaggy Hiker; Jun 30th, 2024 at 10:47 AM.