GdPicture.NET Reference Guide
TwainGetCapDefaultNumeric Method (GdPictureImaging)
Example 





GdPicture14 Namespace > GdPictureImaging Class : TwainGetCapDefaultNumeric Method
A member of the TwainCapabilities enumeration.
Returns the default value of the specified TWAIN capability.
Returns as numeric, the default value of a TWAIN capability.
Syntax
'Declaration
 
Public Function TwainGetCapDefaultNumeric( _
   ByVal Cap As TwainCapabilities, _
   ByRef CurrentValue As Double _
) As Boolean
public bool TwainGetCapDefaultNumeric( 
   TwainCapabilities Cap,
   ref double CurrentValue
)
public function TwainGetCapDefaultNumeric( 
    Cap: TwainCapabilities;
   var  CurrentValue: Double
): Boolean; 
public function TwainGetCapDefaultNumeric( 
   Cap : TwainCapabilities,
   CurrentValue : double
) : boolean;
public: bool TwainGetCapDefaultNumeric( 
   TwainCapabilities Cap,
   ref double CurrentValue
) 
public:
bool TwainGetCapDefaultNumeric( 
   TwainCapabilities Cap,
   double% CurrentValue
) 

Parameters

Cap
A member of the TwainCapabilities enumeration.
CurrentValue
Returns the default value of the specified 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. This method can be used to retrieve the following types of capabilities: TWTY_INT8 , TWTY_INT16, TWTY_INT32, TWTY_UINT8, TWTY_UINT16, TWTY_UINT32, TWTY_BOOL, TWTY_FIX32, TWTY_FRAME. You can determine the type of each TWAIN capability using the TwainGetCapItemType method or looking the twain references from http://www.twain.org
Example
Gets the default the acquisition bit depth used by the default source
Dim DefaultCapValue As Double
oGdPictureImaging.TwainOpenDefaultSource(Me.Handle)
oGdPictureImaging.TwainGetCapDefaultNumeric(TwainCapabilities.ICAP_BITDEPTH, DefaultCapValue)
MessageBox.Show("The default bit depth is: " + DefaultCapValue.ToString())
oGdPictureImaging.TwainCloseSource()
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members
TwainGetCapItemType Method
TwainGetState Method
TwainSetCapCurrentNumeric Method
TwainGetLastConditionCode Method
TwainGetLastResultCode Method