Code: Select all
#include "fivewin.ch"
function Main()
local oWnd
local cText, hBmp
cText := "To generate QR code and save it to hard-disk," + CRLF + ;
"there is no need to write such lengthy code. This one line code is enough" + CRLF + ;
"FW_SaveImage( FW_BarCodeBmp( cText, 'QR', nWidth, nHeight ), cBmpFile )"
hBmp := FW_BarCodeBmp( cText, "QR", 256, 256 )
FW_SaveImage( hBmp, "QRTEST.BMP" )
DeleteObject( hBmp )
DEFINE WINDOW oWnd
ACTIVATE WINDOW oWnd CENTERED ;
ON PAINT oWnd:DrawImage( "QRTEST.BMP" )
return nil