ImageEn, unit ietwain

TIETwainParams.Update

TIETwainParams.Update


Declaration

procedure Update();


Description

Ensures that the current Twain properties are valid.
For example, if the application assigns a combination of PixelType and YResolution unsupported by scanner, the Update method restores the PixelType and YResolution value to a value supported by the scanner.

Note: Don't use this method to refresh the list of available devices, use SetDefaultParams instead.


Example

// Try if RGB and YResolution combination is supported
ImageEnView1.IO.TwainParams.PixelType.CurrentValue := 2;
ImageEnView1.IO.TwainParams.YResolution.CurrentValue := 300;
ImageEnView1.IO.TwainParams.Update;
if (ImageEnView1.IO.TwainParams.PixelType.CurrentValue<>2) or (ImageEnView1.IO.TwainParams.YResolution.CurrentValue<>300) then
  ShowMessage('error!');