ImageEn, unit ietwain

TIETwainParams.SourceSettings

TIETwainParams.SourceSettings


Declaration

property SourceSettings: TMemoryStream;


Description

SourceSettings contains custom Twain source settings.
This memory stream is filled when ShowSettingsOnly is true and you call Acquire.
You can also load it from file to provide already saved settings.


Demo

Demo  Demos\ImageAcquisition\TwainStore\TwainStore.dpr


Example

// first session: show scanner dialog only to set scanner settings
ImageEnView1.IO.TwainParams.ShowSettingsOnly := true;
ImageEnView1.IO.Acquire();
ImageEnView1.IO.TwainParams.SourceSettings.SaveToFile('mysettings.dat');

// another session: use saved settings
ImageEnView1.IO.TwainParams.ShowSettingsOnly := false;
ImageEnView1.IO.TwainParams.VisibleDialog := false;
ImageEnView1.IO.TwainParams.SourceSettings.LoadFromFile('mysettings.dat');
ImageEnView1.IO.Acquire();