TwainSetCapCurrentNumeric Method

See Also     Examples     Applies To

Changes the current value of a twain capability.

Syntax

object.TwainSetCapCurrentNumeric (nCap, nItemType, nNewValue)

The TwainSetCapCurrentNumeric syntax has these parts:

Part Description
object Required. An object expression that evaluates to an object in the Applies To list.
nCap Required. Long A TWAIN Capability constant.
nItemType Required. Long A TWAIN Item Type constant.
This value can be get using the TWAINGetCapItemType(nCap).
nNewValue Required. Long. New value to set to the selected twain capability.

Returns

Boolean. True if Success else False: Use TwainGetLastResultCode() and TwainGetLastConditionCode() methods for diagnosing the error.

Remarks

Before using this method check that the TWAIN state is >= 4 (TWAIN_SOURCE_OPEN)
To get the TWAIN state, use the TwainGetState() method.

Category

TWAIN Capability

Visual Basic Sample

To set the X resolution to 100 DPI :
bSuccess = object.TwainSetCapCurrentNumeric(ICAP_XRESOLUTION, object.TWAINGetCapItemType(ICAP_XRESOLUTION), 100)





© Copyright 2007 GdPicture All rights reserved.
Documentation MAP.