ImageEn, unit imageenio

TImageEnIO.SelectedAcquireSource

TImageEnIO.SelectedAcquireSource


Declaration

property SelectedAcquireSource : TIEAcquireSource; (Read only)


Description

Return the acquisition source that is currently active due to selection by the user with SelectAcquireSource or programmatically using SetAcquireSource.
A TIEAcquireSource record is returned that provides meta information about the device (SelectedAcquireSource.Name, SelectedAcquireSource.DeviceType) and technical details (SelectedAcquireSource.Api, SelectedAcquireSource.Location).
If no device is selected then SelectedAcquireSource.Api will be ieaNone.


Examples

// Display the selected source
if ImageEnView1.IO.SelectedAcquireSource.Api = ieaNone then
  ShowMessage('No device is selected')
else
  ShowMessage('The selected device is ' + ImageEnView1.IO.SelectedAcquireSource.Name);

// Read and restore the selected source
var
  sDevice : string;
  ADevice : TIEAcquireSource;
begin
  ...
  // Read the selected device
  sDevice := AcquireSourceToStr(ImageEnView1.IO.SelectedAcquireSource);
  ...
end;

var
  sDevice : string;
  ADevice : TIEAcquireSource;
begin
  ...
  // Restore the device selection
  ADevice := StrToAcquireSource(sDevice);
  ImageEnView1.IO.SetAcquireSource(ADevice.Api, ADevice.Location);
  ...
end;


See Also

SelectAcquireSource
SetAcquireSource