ImageEn, unit iemio

TImageEnMIO.SelectAcquireSource

TImageEnMIO.SelectAcquireSource


Declaration

function SelectAcquireSource(Apis : TIEAcquireApis = [ieaTwain, ieaWIA, ieaDCIM]; DeviceGlyphHue : Integer = -999): boolean;


Description

Prompt the user with a dialog to select a Twain, WIA or portable device.



Use Apis to specify which sources are available to the user. Any combination of the following can be used:
Value Description
ieaTwain Acquire from Twain device
ieaWIA Acquire using WIA (scanners or camera)
ieaDCIM Read from a connected phone, camera or device (containing a DCIM folder) using the WPD API

Note: If your location is only [ieTwain] or [ieWIA] then the default Twain/WIA selector is shown. Otherwise a custom device selector is used (Use MsgLanguage to control the language in the custom dialog).

DeviceGlyphHue specifies the color of the graphics (Camera, Scanner, etc.) in the device selector:
Value Description
0 ImageEn blue color (#1E88E5)
-180 to +180 Blue color is modified by the specified hue
-998 Gray
-999 Dark gray
-900 No graphics/text only

Returns False if user presses the "Cancel" button.


Demo

Demo  Demos\ImageAcquisition\AllAcquire\AllAcquire.dpr


Example

if ImageEnMView1.MIO.SelectAcquireSource([ieaTwain, ieaWIA, ieaDCIM]) then
  ImageEnMView1.MIO.Acquire();