You are here: GdPicture.NET > Documentation > Classes > GdPictureImaging Class > GdPictureImaging Methods > TWAIN Features > TwainGetAvailableCapValueNoString Method
logo.gif
ContentsIndexHome
PreviousUpNext
GdPictureImaging.TwainGetAvailableCapValueNoString Method

Returns an available string value for the selected TWAIN capability which can be used by the opened source in its current configuration. 

This function should be used to determine what are the supported value which can be used with the TwainSetCapCurrentString() function.

C#
public String TwainGetAvailableCapValueNoString(
    TwainCapabilities Cap, 
    int Number
);
Visual Basic
Public Function TwainGetAvailableCapValueNoString(
    ByVal Cap As TwainCapabilities, 
    ByVal Number As Integer
) As String
Parameters
Parameters 
Description 
Cap 
A member of the TwainCapabilities enumeration.  
Number 
Index of the available value. Must be a value between 1 and TwainGetAvailableCapValuesCount() returned value.  
Returns

The selected available value of the selected TWAIN capability.

Before using this function check that the TWAIN state is >= 4 (TWAIN_SOURCE_OPEN) 

To get the TWAIN state, use the TwainGetState() function. 

 

This function can be used to set the following types of capabilities: TWTY_STR32, TWTY_STR64, TWTY_STR128, TWTY_STR255 . 

You can determine the type of each TWAIN capability using the TwainGetCapItemType function or looking the twain references from http://www.twain.org

list names of the halftone patterns supported by the default source

Dim i As Integer
Dim AvailableCapValue As Double
 
oGdPictureImaging.TwainOpenDefaultSource(Me.Handle)
For i = 1 To oGdPictureImaging.TwainGetAvailableCapValuesCount(TwainCapabilities.ICAP_HALFTONES)
    AvailableCapValue = oGdPictureImaging.TwainGetAvailableCapValueNoString(TwainCapabilities.ICAP_HALFTONES, i)
    MsgBox("Supported value no: " + Str(i) + " are: " + Str(AvailableCapValue))
Next i
 
oGdPictureImaging.TwainCloseSource()
What do you think about this topic? Send feedback!
Copyright (c) 2009-2011 www.gdpicture.com. All rights reserved.