GdPicture.NET Reference Guide
TwainSetCapCurrentNumeric Method (GdPictureImaging)
Example 





GdPicture14 Namespace > GdPictureImaging Class : TwainSetCapCurrentNumeric Method
A member of the TwainCapabilities enumeration.
A member of the TwainItemTypes enumeration.You can determine the type of each TWAIN capability using the TwainGetCapItemType method or looking the twain references from http://www.twain.org.
New value (as numeric) to set to the selected TWAIN capability.
Changes the current value of a TWAIN capability from a numeric value. The TwainGetAvailableCapValueNoNumeric() method should be used to determine what are the supported value which can be used with this method.
Syntax
'Declaration
 
Public Function TwainSetCapCurrentNumeric( _
   ByVal Cap As TwainCapabilities, _
   ByVal ItemType As TwainItemTypes, _
   ByVal NewValue As Double _
) As Boolean
public bool TwainSetCapCurrentNumeric( 
   TwainCapabilities Cap,
   TwainItemTypes ItemType,
   double NewValue
)
public function TwainSetCapCurrentNumeric( 
    Cap: TwainCapabilities;
    ItemType: TwainItemTypes;
    NewValue: Double
): Boolean; 
public function TwainSetCapCurrentNumeric( 
   Cap : TwainCapabilities,
   ItemType : TwainItemTypes,
   NewValue : double
) : boolean;
public: bool TwainSetCapCurrentNumeric( 
   TwainCapabilities Cap,
   TwainItemTypes ItemType,
   double NewValue
) 
public:
bool TwainSetCapCurrentNumeric( 
   TwainCapabilities Cap,
   TwainItemTypes ItemType,
   double NewValue
) 

Parameters

Cap
A member of the TwainCapabilities enumeration.
ItemType
A member of the TwainItemTypes enumeration.You can determine the type of each TWAIN capability using the TwainGetCapItemType method or looking the twain references from http://www.twain.org.
NewValue
New value (as numeric) to set to the selected TWAIN capability.

Return Value

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.
Example
To set the X resolution to 100 DPI
bSuccess = oGdPictureImaging.TwainSetCapCurrentNumeric(TwainCapabilities.ICAP_XRESOLUTION, oGdPictureImaging.TwainGetCapItemType(TwainCapabilities.ICAP_XRESOLUTION), 100)
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members
TwainGetCapItemType Method
TwainGetState Method
TwainGetAvailableCapValuesCount Method
TwainGetAvailableCapValueNoNumeric Method
TwainGetCapCurrentNumeric Method