Accusoft.TwainProSdk Namespace > TwainDevice Class : GetCapabilityConstantDescription Method |
'Declaration Public Function GetCapabilityConstantDescription( _ ByVal capability As Capability, _ ByVal index As Integer _ ) As String
'Usage Dim instance As TwainDevice Dim capability As Capability Dim index As Integer Dim value As String value = instance.GetCapabilityConstantDescription(capability, index)
public string GetCapabilityConstantDescription( Capability capability, int index )
public: string* GetCapabilityConstantDescription( Capability capability, int index )
public: String^ GetCapabilityConstantDescription( Capability capability, int index )
When the capability type is TWCAP_ENUM, the Source may return a list of constants that signify settings.
For example, if Capability = ICAP_PIXELTYPE, and the Source returns a TWCAP_ENUM containing the constants, TwptBW (0), TwptGray (1), TwptRgb (2) a description of each may be obtained with the GetCapabilityConstantDescription method.
TwainPRO.GetCapabilityConstantDescription( Capability.IcapPixelType, (System.Int32)CapabilityConstants.TwptBW ) would return "Black and White". This can be used for filling a listbox or combobox with descriptions of available values instead of just the constants.