LOCAL ; llRtnVal, ; lnDPI * Assume Failure llRtnVal = .F. DO WHILE .T. WITH ThisForm.TwainPro .Capability = 8 && TWCAP_UNITS IF .CapSupported .CapTypeOut = TWCAP_ONEVALUE .CapValueOut = 5 && TWUN_PIXELS ENDIF .Capability = TWCAP_XRESOLUTION IF .CapSupported .CapTypeOut = 0 .CapValueOut = ThisForm.nDpI .SetCapOut() ENDIF .Capability = TWCAP_YRESOLUTION IF .CapSupported .CapTypeOut = 0 .CapValueOut = ThisForm.nDpI .SetCapOut() ENDIF ENDWITH llRtnVal = .T. EXIT ENDDO RETURN llRtnValI get and TWAIN ERROR: