VB.NET Requires Chilkat v11.7.0+
VB.NET
Get the QR Code Capabilities of the Chilkat Version in Use
See more QR Code Examples
Demonstrates the capabilities operation, which describes what the installed version of Chilkat can do: the range of QR versions, the error-correction levels, the operations, the image formats and the limits. A program can check for a feature here instead of testing for a Chilkat version number. The request can be an empty JSON object.Chilkat VB.NET Downloads
Dim success As Boolean = False
' This example requires the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
Dim json As New Chilkat.JsonObject
Dim fmt As New Chilkat.Formats
Dim jsonOut As New Chilkat.JsonObject
success = fmt.QrCode("capabilities",json,jsonOut)
If (success = False) Then
Debug.WriteLine(fmt.LastErrorText)
Exit Sub
End If
Debug.WriteLine("Chilkat version: " & jsonOut.StringOf("productVersion"))
Debug.WriteLine("symbology: " & jsonOut.StringOf("symbologies[0].id"))
Debug.WriteLine("QR versions: " & jsonOut.IntOf("symbologies[0].encoding.version.min") & " to " & jsonOut.IntOf("symbologies[0].encoding.version.max"))
Debug.WriteLine("structured append, most symbols: " & jsonOut.IntOf("symbologies[0].structuredAppend.maxSymbols"))
Dim i As Integer
Dim n As Integer
n = jsonOut.SizeOfArray("symbologies[0].encoding.errorCorrection")
For i = 0 To n - 1
jsonOut.I = i
Debug.WriteLine("error correction: " & jsonOut.StringOf("symbologies[0].encoding.errorCorrection[i]"))
Next
' The operations this version implements.
n = jsonOut.SizeOfArray("operations")
For i = 0 To n - 1
jsonOut.I = i
If (jsonOut.BoolOf("operations[i].available") = True) Then
Debug.WriteLine("operation: " & jsonOut.StringOf("operations[i].name"))
End If
Next
n = jsonOut.SizeOfArray("imageFormats.output")
For i = 0 To n - 1
jsonOut.I = i
Debug.WriteLine("image format: " & jsonOut.StringOf("imageFormats.output[i]"))
Next
Debug.WriteLine("default timeout: " & jsonOut.IntOf("limits.timeoutMs.default") & " ms")
Debug.WriteLine("default largest image: " & jsonOut.IntOf("limits.maxPixels.default") & " pixels")
' Sample output:
' Chilkat version: 11.7.0
' symbology: qr
' QR versions: 1 to 40
' structured append, most symbols: 16
' error correction: auto
' error correction: L
' error correction: M
' error correction: Q
' error correction: H
' operation: generate
' operation: measure
' operation: validate
' operation: capabilities
' image format: png
' image format: svg
' default timeout: 10000 ms
' default largest image: 16777216 pixels