Page 1 of 1

how can i find error / return codes?

Posted: Wed Jun 13, 2007 11:11 am
by nobbe
hello all

i am trying to figure out how to detect if loading a file in the object fails?
i am using the activeX object to handle the files . i Read about "GFL_ERROR" , but cant seem to find out how to use on an activex object?

e.g. $rc = $imgObject.LoadBitmap ($file);
but here the $rc doesnt return anything

greetings



$imgObject = ObjCreate("GflAx.GflAx")
If $imgObject <> 0 Then

$rc = $imgObject.LoadBitmap ($file);
ConsoleWrite("load " & $rc & @CRLF)

; if loading fails??

$widthOrig = $imgObject.Width ()
$heightOrig = $imgObject.Height ()

$widthTh = Int($widthOrig / 4) ; 1/4 of original
$heightTh = Int($heightOrig / 4)