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

Changes the current value of a TWAIN capability from a numeric value. 

The TwainGetAvailableCapValueNoNumeric() function should be used to determine what are the supported value which can be used with this function.

C#
public Boolean TwainSetCapCurrentNumeric(
    TwainCapabilities Cap, 
    TwainItemTypes ItemType, 
    Double NewValue
);
Visual Basic
Public Function TwainSetCapCurrentNumeric(
    ByVal Cap As TwainCapabilities, 
    ByVal ItemType As TwainItemTypes, 
    ByVal NewValue As Double
) As Boolean
Parameters
Parameters 
Description 
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 function or looking the twain references from http://www.twain.org  
NewValue 
New value (as numeric) to set to the selected TWAIN capability.  
Returns

True if success, else False -> Use TwainGetLastResultCode() and TwainGetLastConditionCode() functions for diagnosing the error.

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

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

To set the X resolution to 100 DPI

              bSuccess = oGdPictureImaging.TwainSetCapCurrentNumeric(TwainCapabilities.ICAP_XRESOLUTION, oGdPictureImaging.TwainGetCapItemType(TwainCapabilities.ICAP_XRESOLUTION), 100)
What do you think about this topic? Send feedback!
Copyright (c) 2009-2011 www.gdpicture.com. All rights reserved.