ImageEn, unit iexAcquire

TIEAcquireParams.SelectedSource

TIEAcquireParams.SelectedSource


Declaration

property SelectedSource: TIEAcquireSource; (Read-only)


Description

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

** Generally you should NOT use this property directly. Use TImageEnIO.SelectedAcquireSource or TImageEnMIO.SelectedAcquireSource Instead **


See Also

SelectSource
SetSource


Examples

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

// Read and restore the selected source
var
  sDevice : string;
begin
  ..
  // Read the selected device
  sDevice := AcquireSourceToStr(AcquireParams.SelectedSource);
  ..
end;
    
var
  sDevice : string;
  ADevice : TIEAcquireSource;
begin
  ..
  // Restore the device selection
  ADevice := StrToAcquireSource(sDevice);
  AcquireParams.SetSource(ADevice.Api, ADevice.Location);
  ..
end;