GdPicture.NET Reference Guide
TwainGetAvailableCapValueNoNumeric Method (GdPictureImaging)
Example 





GdPicture14 Namespace > GdPictureImaging Class : TwainGetAvailableCapValueNoNumeric Method
A member of the TwainCapabilities enumeration.
Index of the available value. Must be a value between 1 and TwainGetAvailableCapValuesCount() returned value.
Returns an available numeric value for the selected TWAIN capability which can be used by the opened source in its current configuration. This method should be used to determine what are the supported value which can be used with the TwainSetCapCurrentNumeric() method.
Syntax
'Declaration
 
Public Function TwainGetAvailableCapValueNoNumeric( _
   ByVal Cap As TwainCapabilities, _
   ByVal Number As Integer _
) As Double
public double TwainGetAvailableCapValueNoNumeric( 
   TwainCapabilities Cap,
   int Number
)
public function TwainGetAvailableCapValueNoNumeric( 
    Cap: TwainCapabilities;
    Number: Integer
): Double; 
public function TwainGetAvailableCapValueNoNumeric( 
   Cap : TwainCapabilities,
   Number : int
) : double;
public: double TwainGetAvailableCapValueNoNumeric( 
   TwainCapabilities Cap,
   int Number
) 
public:
double TwainGetAvailableCapValueNoNumeric( 
   TwainCapabilities Cap,
   int Number
) 

Parameters

Cap
A member of the TwainCapabilities enumeration.
Number
Index of the available value. Must be a value between 1 and TwainGetAvailableCapValuesCount() returned value.

Return Value

The selected available value of the selected TWAIN capability.
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 set 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
List all supported X resolution of the default source
Dim i As Integer
Dim AvailableCapValue As Double
oGdPictureImaging.TwainOpenDefaultSource(Me.Handle)
For i = 1 To oGdPictureImaging.TwainGetAvailableCapValuesCount(TwainCapabilities.ICAP_XRESOLUTION)
   AvailableCapValue = oGdPictureImaging.TwainGetAvailableCapValueNoNumeric(TwainCapabilities.ICAP_XRESOLUTION, i)
   MessageBox.show("Supported value no: " + Str(i) + " is: " + Str(AvailableCapValue))
Next i
oGdPictureImaging.TwainCloseSource()
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members
TwainGetState Method
TwainGetAvailableCapValuesCount Method
TwainSetCapCurrentNumeric Method
TwainGetCapItemType Method