See Also Examples Applies To
Changes the current value of a TWAIN capability.
Syntax
object.TwainSetCapCurrentString (nCap, nItemType, sNewValue)
The TwainSetCapCurrentString 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_STR32, TWTY_STR64, TWTY_STR128, TWTY_STR255, TWTY_STR1024, TWTY_UNI512. You can determine the type of each TWAIN capability using the TwainGetCapItemType function or looking the twain references from http://www.twain.org |
| sNewValue | Required. String. New value 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.
This fuction can be used to set the folowing types of capabilities: .
Category
TWAIN Functions
Visual Basic Sample
To set the ORDERED halftone mode
bSuccess = object.TwainSetCapCurrentString(ICAP_HALFTONES, object.TwainGetCapItemType(ICAP_HALFTONES), "ORDERED")