vbQRCode is a library for Basic language (Visual Basic 6.0/.NET/20xx) that can be used to create and encode QRCode, without using third parts software, external DLL or ActiveX (OCX).
Features
- BIN, ALPHA, NUMERIC encoding. QR Code symbols can encode the following amount of data (for maximum symbol size – Version 40, error correction level L):
- NUMERIC: 7,089 characters (digit 0-9)
- ALPHA: 4,296 characters (digits 0-9; upper case letters A-Z and nine other characters: space,$%*+-./:)
- BIN 8-bit byte data: 2,953 characters (bytes 0-255)
- Versions 1 to 40. The version is the size of the symbol. Version 1 is a 21×21 matrix and version 40 is a 177×177 matrix.
- MicroQRCode from M1 to M4.
- UTF-8 support.
- Error correction levels L (7%), H (15%), M (20%) and Q (30%).
- Models for: free text, sms, email, vCard contacs, URL, …
- Direct export to BMP, EPS, SVG, HTML, WMF format, monospace Font
- Direct print
- Add logo to QRCode
Download
How to get the source code
The source code of vbQRCode class will be get only after a contribute of 30 euros.
If You want, You can use the “Donate” button below:
You can found other way to contribue in the donation page or You can contact me.
Screenshot
Some screenshots:
Sample source code
With a PictureBox
'' Visual Basic 6.0
Set vbQRObj = New vbQRCode
vbQRObj.Encode("text to encode")
Matrix() = vbQRObj.Matrix()
iScale = 5
For y = 0 To vbQRObj.Size -1
For x = 0 To vbQRObj.Size -1
If Matrix(y,x) = 1 Then
picCode.Line (x * iScale, y * iScale)- Step(iScale, iScale), vbBlack, BF
End If
Next
Next
Add a logo
'' Visual Basic 6.0
Set vbQRObj = New vbQRCode
Dim logo(10) As String
logo(0) = " 00000 "
logo(1) = " 0111110 "
logo(2) = " 011111110 "
logo(3) = "01100100110"
logo(4) = "01100100110"
logo(5) = "01111111110"
logo(6) = "01011111010"
logo(7) = "01101110110"
logo(8) = " 011000110 "
logo(9) = " 0111110 "
logo(10) = " 00000 "
Call vbQRObj.AddLogo(logo)
vbQRObj.Encode("text to encode")
'' ...
Save as file
'' Visual Basic 6.0
Set vbQRObj = New vbQRCode
vbQRObj.Encode("text to encode")
iScale = 5
'' Save to EPS format file
fb = FreeFile
Open "qrcode.eps" For Output As #fb
Print #fb, vbQRObj.GetEPS(iScale)
Close #fb
'' Save to SVG format file
fb = FreeFile
Open "qrcode.svg" For Output As #fb
Print #fb, vbQRObj.GetSVG(iScale)
Close #fb
End If
'' Save to HTML format file
fb = FreeFile
Open "qrcode.html" For Output As #fb
Print #fb, vbQRObj.GetHTML(iScale)
Close #fb
'' Save to BMP format file
fb = FreeFile
Open "qrcode.bmp" For Output As #fb
Print #fb, vbQRObj.GetBMP(iScale)
Close #fb
'' Save to WMF format file
fb = FreeFile
Open "qrcode.wmf" For Output As #fb
Print #fb, vbQRObj.GetWMF(iScale)
Close #fb
Direct print
'' Visual Basic 6.0
Set vbQRObj = New vbQRCode
vbQRObj.Encode("text to encode")
ModuleSize = 5
'' Print on default printer
Call vbQRObj.ToPrinter(Printer, XPos, YPos, ModuleSize)
Printer.EndDoc