See Also Examples Applies To
Acquires a single image, from the currently selected Data Source to a DIB handle.
Syntax
object.TwainAcquireToDib (hwnd)
The TwainAcquireToDib syntax has these parts:
| Part | Description |
| object | Required. An object expression that evaluates to an object in the Applies To list. |
| hwnd | Optional. Long. Default value is 0. A Win32 Window Handle. In most applications you can use 0 but on Citrix and WTS, this must be a top-level window or a child of a top level window. |
Returns
Long.
0: The bitmap could not created. Use the GetStat() method to determine the
reason this method failed.
Non-zero: DIB handle .
Remarks
By default, the default data source (DS) is opened, displays its dialog, and
determines all the parameters of the acquisition and transfer.
If you want to (try to) hide the DS dialog, see TWAINSetHideUI.
Before using this method check that the TWAIN state is >= 4 (TWAIN_SOURCE_OPEN)
To get the TWAIN state, use the TwainGetState() method.
To set the TWAIN state to 4, use the TwainOpenDefaultSource() or TwainOpenSource() method.
Category
TWAIN Capability