PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Specific properties
  • Operating mode in the 64-bit applications
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Allows you to get or change the properties of the current Twain device. This Twain device can be selected by TwainSelectSource.
Example
// Find out the scanner resolution
nResolution is int = TwainProperty(TwainRésolution)
// Modify the resolution to 200 dpi
bApply is boolean = TwainProperty(TwainRésolution, 200)
Syntax

Finding out the properties of the current Twain device Hide the details

<Result> = TwainProperty(<Property>)
<Result>: Integer
  • Value of the specified property.
  • 0 if the TWAIN device does not support the modification of the requested property or the value of the requested property.
<Property>: Integer constant
Property whose values are requested. This property corresponds to one of the following constants:
TwainBitsByPixelNumber of bits per pixel.
TwainBrightnessBrightness of the device.
<Value> must be included between -1000 and 1000.
TwainFeederEnabledManagement mode of feeder. <Result> is set to:
  • True if the feeder is enabled,
  • False otherwise.
TwainContrastContrast of the Twain device. <Result> will be included between -1000 and 1000.
TwainBorderDetectionEnabledDetection mode of borders. <Result> is set to:
  • True if the detection of borders is enabled,
  • False otherwise.
TwainBarCodeDetectionEnabledDetection mode of bar codes. <Result> is set to:
  • True if the detection of bar codes is enabled,
  • False otherwise.
TwainHeightMaximum height (in millimeters).
TwainInterfaceControllableManagement mode of user interface. <Result> is set to:
  • True if the user interface can be disabled,
  • False otherwise.
TwainWidthMaximum width (in millimeters)
TwainReadyStatus of the device. <Result> is set to:
  • True if the device is plugged in and ready,
  • False otherwise.
TwainDuplexSupport for double side. <Result> is set to:
  • True if the device supports the double side,
  • False otherwise.
TwainDuplexEnabledManagement mode of double side. <Result> is set to:
  • True if the double side is enabled,
  • False otherwise.
TwainAutoResizeEnabledManagement mode of automatic resize. <Result> is set to:
  • True if the automatic resize of images is enabled,
  • False otherwise.
TwainAutoDeskewEnabledManagement mode of automatic image deskew. <Result> is set to:
  • True if the automatic deskew of images is enabled,
  • False otherwise.
TwainResolutionResolution in pixels per inch.
TwainAutoRotationEnabledManagement mode of image rotation. <Result> is set to:
  • True if the automatic image rotation is enabled,
  • False otherwise.
TwainBlankPageSkipEnabledManagement mode of blank pages. <Result> is set to:
  • True if the blank pages are skipped,
  • False otherwise.
TwainTypeType of supported images. <Result> is set to:
  • TwainPalette: Manages the colored images issued from a palette (1, 4 or 8 bits per pixel).
  • TwainRGB: Manages the RGB image (24 bits per pixel).
  • TwainGrayScale: Manages the grayscale images.
  • TwainBlackWhite: Manages the black and white images.

Modifying the properties of the current Twain device Hide the details

<Result> = TwainProperty(<Property> , <Value>)
<Result>: Boolean
  • True if the property was modified,
  • False otherwise
<Property>: Integer constant
Property whose value must be modified. This property corresponds to one of the following constants:
TwainBitsByPixelNumber of bits per pixel.
TwainBrightnessBrightness of the device: <Value> will be included between -1000 and 1000.
TwainFeederEnabledManagement mode of feeder. <Value> is set to:
  • True if the feeder must be enabled,
  • False otherwise.
TwainContrastContrast of the Twain device. <Value> will be included between -1000 and 1000.
TwainBorderDetectionEnabledDetection mode of borders. <Value> is set to:
  • True if the detection of borders must be enabled,
  • False otherwise.
TwainBarCodeDetectionEnabledDetection mode of bar codes. <Result> is set to:
  • True if the detection of bar codes must be enabled,
  • False otherwise.
TwainDuplexEnabledManagement mode of double side. <Value> is set to:
  • True to enable the double side,
  • False otherwise.
TwainAutoResizeEnabledManagement mode of automatic resize. <Value> is set to:
  • True if the automatic resize of images must be enabled,
  • False otherwise.
TwainAutoDeskewEnabledManagement mode of automatic image deskew. <Value> is set to:
  • True if the automatic image deskew must be enabled,
  • False otherwise.
TwainResolutionResolution in pixels per inch.
TwainAutoRotationEnabledManagement mode of image rotation. <Value> is set to:
  • True if the automatic image rotation must be enabled,
  • False otherwise.
TwainBlankPageSkipEnabledManagement mode of blank pages. <Value> is set to:
  • True if the blank pages must be skipped,
  • False otherwise.
TwainTypeType of supported images. <Value> corresponds to the following constant or combination of constants:
  • TwainPalette: Manages the colored images issued from a palette (1, 4 or 8 bits per pixel).
  • TwainRGB: Manages the RGB image (24 bits per pixel).
  • TwainGrayScale: Manages the grayscale images.
  • TwainBlackWhite: Manages the black and white images.
<Value>: Integer
New value for the requested property.
Remarks

Specific properties

You have the ability to retrieve or modify the value of a property not listed in the above-mentioned Twain constants. In this case, the <Property> parameter will correspond to the value of the CAP_xxx or ICAP_xxx constant of TWAIN.H, associated with the requested property.

Operating mode in the 64-bit applications

In a 64-bit application, this function will automatically use the 64-bit Twain driver. The TWAIN cannot be used if this driver is not installed.
Component: wd270std.dll
Minimum version required
  • Version 20
This page is also available for…
Comments
An addendum to the very important Help DPI
Dear,

An addendum to the very important Help:

So it comes in lower resolution 96 dpi Scanner
nResolution is int = TwainProperty (TwainResolution)

So you can set the scanner will digiltalizar at 200 dpi
nResolution is int = TwainProperty (TwainResolution, 200)

OK
adrianoboller
18 Apr. 2016