ImageEn, unit ietwain

TIETwainParams.SelectSourceByName

TIETwainParams.SelectSourceByName


Declaration

function SelectSourceByName(const sn: AnsiString): boolean;


Description

Selects the first device that matches left name string with sn.
Returns true if device is found.
The list of names is contained in SourceName[] list.


Example

// Select the second scanner
ImageEnView1.IO.TwainParams.SelectedSource := 1;

// OR Select scanner by name
ImageEnView1.IO.TwainParams.SelectSourceByName('CanoScan FB620');

// OR Select scanner with standard dialog
ImageEnView1.IO.SelectAcquireSource();

// THEN Acquire
ImageEnView1.IO.Acquire();