TwainSetCapCurrentNumeric Method

See Also     Examples     Applies To

Changes the current value of a TWAIN capability from a numeric value.
The TwainGetAvailableCapValueNoNumeric() function should be used to determine what are the supported value which can be used with this function.

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.
Should be: TWTY_INT8, TWTY_INT16, TWTY_INT32, TWTY_UINT8, TWTY_UINT16, TWTY_UINT32, TWTY_BOOL.
You can determine the type of each TWAIN capability using the TwainGetCapItemType function or looking the twain references from http://www.twain.org
nNewValue Required. Long. New value (as numeric) to set to the selected TWAIN capability.

Returns

Boolean. True if success, else False -> Use TwainGetLastResultCode() and TwainGetLastConditionCode() functions for diagnosing the error.

Remarks

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

Category

TWAIN Functions

Visual Basic Sample

To set the X resolution to 100 DPI


              bSuccess = object.TwainSetCapCurrentNumeric(ICAP_XRESOLUTION, object.TWAINGetCapItemType(ICAP_XRESOLUTION), 100)






© Copyright 2008 GdPicture All rights reserved.
Documentation MAP.