' This code requires NViewLib.DLL ' Notes: You can use QIMAGE like QBITMAP if you set its visible property to ' false. The only exception being QIMAGE requires a parent property. DECLARE FUNCTION Load_GIF LIB "NVIEWLIB" ALIAS "Load_GIF" _ (FileName AS STRING, Progress AS INTEGER) AS INTEGER DECLARE FUNCTION Load_JPG LIB "NVIEWLIB" ALIAS "Load_JPG" _ (FileName AS STRING, Progress AS INTEGER) AS INTEGER DECLARE FUNCTION NViewLibLoad LIB "NVIEWLIB" ALIAS "NViewLibLoad" _ (FileName AS STRING, Progress AS INTEGER) AS INTEGER DECLARE FUNCTION NViewLibSaveAsJPG LIB "NVIEWLIB" ALIAS "NViewLibSaveAsJPG" _ (Quality AS INTEGER, FileName AS STRING) AS INTEGER DECLARE FUNCTION NViewLibSetLanguage LIB "NVIEWLIB" ALIAS "NViewLibSetLanguage" _ (Language AS STRING) AS INTEGER DECLARE SUB NViewLibSetCustomLang LIB "NVIEWLIB" ALIAS "NViewLibSetCustomLang" _ (Progress AS STRING, Error AS STRING, Load AS STRING, _ ErrLoad AS STRING, Warning AS STRING) DECLARE FUNCTION GetWidth LIB "NVIEWLIB" ALIAS "GetWidth" AS INTEGER DECLARE FUNCTION GetHeight LIB "NVIEWLIB" ALIAS "GetHeight" AS INTEGER DIM FileName AS STRING FileName = "c:\rapidq\cool.jpg" CREATE Form AS QFORM CREATE Image AS QImage Autosize=1 '-- Let image size itself Handle = NViewLibLoad(FileName, 0) '-- Handle returned TextOut(10,10, FileName, 0, -1) '-- Draw text string END CREATE ShowModal END CREATE