QRCode
TsgcHTMLComponent_QRCode — render a pure-Pascal ISO/IEC 18004 SVG QR code from any text or URL, with selectable error correction level, in Delphi, C++ Builder and .NET.
TsgcHTMLComponent_QRCode — render a pure-Pascal ISO/IEC 18004 SVG QR code from any text or URL, with selectable error correction level, in Delphi, C++ Builder and .NET.
Set Data and ECCLevel, then read the HTML property — or call the Build one-liner for a single line of code.
TsgcHTMLComponent_QRCode
Inline SVG QR code + optional caption (pure-Pascal encoder)
Delphi, C++ Builder, .NET
Set Data, pick an ECCLevel, then read HTML — or call the static Build helper.
uses
sgcHTML_Component_QRCode;
var
oQR: TsgcHTMLComponent_QRCode;
sHTML: string;
begin
oQR := TsgcHTMLComponent_QRCode.Create(nil);
try
oQR.Data := 'https://www.esegece.com';
oQR.ECCLevel := qrHigh;
oQR.ModuleSize := 6;
oQR.Caption := 'Scan to open';
oQR.CaptionVisible := True;
WebModule.Response := oQR.HTML; // SVG QR modules + optional caption
finally
oQR.Free;
end;
end;
// One-liner for inline use inside a bigger page:
sHTML := TsgcHTMLComponent_QRCode.Build('https://www.esegece.com', qrHigh, 6);
// includes: sgcHTML_Component_QRCode.hpp
TsgcHTMLComponent_QRCode *oQR = new TsgcHTMLComponent_QRCode(NULL);
try
{
oQR->Data = "https://www.esegece.com";
oQR->ECCLevel = qrHigh;
oQR->ModuleSize = 6;
oQR->Caption = "Scan to open";
oQR->CaptionVisible = true;
String html = oQR->HTML; // SVG QR modules + optional caption
}
__finally
{
delete oQR;
}
using esegece.sgcWebSockets;
var qr = new TsgcHTMLComponent_QRCode();
qr.Data = "https://www.esegece.com";
qr.ECCLevel = TsgcHTMLQRECCLevel.qrHigh;
qr.ModuleSize = 6;
qr.Caption = "Scan to open";
qr.CaptionVisible = true;
string html = qr.HTML; // SVG QR modules + optional caption
The members you reach for most often.
Data holds the text or URL to encode; the encoder auto-selects numeric, alphanumeric or byte mode and the smallest version 1–40 that fits.
ECCLevel (qrLow/qrMedium/qrQuartile/qrHigh) trades symbol size for damage tolerance.
ModuleSize sets the pixel size of each module; QuietZone controls the light border, in modules.
DarkColor/LightColor recolour the modules and background; keep enough contrast to stay scannable.
Caption/CaptionVisible render an optional text line below the code.
The class function Build(aData, aECCLevel, aModuleSize) returns ready HTML without managing an instance.
| Online HelpFull API reference and usage guide for this component. | Open | |
| All sgcHTML ComponentsBrowse the full feature matrix of 80+ components. | Open | |
| Download Free TrialThe 30-day trial ships the 60.HTML demo projects. | Open | |
| PricingSingle, Team and Site licenses with full source code. | Open |