title: DelphiTwain : How to know that scanning from feeder is finished
body: <p>I am using TDelphiTwain component for scanning. When i start scanning from feeder, all scanning performed assynchronously and event OnTwainAcquire triggered when new image available for processing. But i can not find how to check that scanning of all douments already finished. When feeder tray is empty, then scanning stops and if i put new papers to the feeder it do not process it.
  So i need to know that it is finished and i can process received images.
  I can check that feeder is empty, but i can easy miss (with my check) the moment when tray was empty, so app will think that new images are coming, but they don't.
  I supposed there should be kind of events for such task (StartSession/StopSession), but i can't find it.</p>
  
  <p>in the code it looks like this:</p>
  
  <pre><code>procedure TFormDemo.FormShow(Sender: TObject);
  begin
    Twain := TTwainScanner.Create;
    Twain.OnTwainAcquire := Acquire;
    Twain.Source[SelectedDevice].SetFeederEnabled(True);
    Twain.Source[SelectedDevice].Enabled := True; // start
  end;
  
  procedure TFormDemo.Acquire(Sender: TObject; const Index: Integer;
    Bitmap: TBitmap; var Cancel: Boolean);
  begin
    // some processing
    Cancel := False;
  end;
  </code></pre>
  
  <p>I also catch OnAcquireProgress event but it is progress of current image scanning and it doesn't help to know when scanning stopped.</p>
  
  <p>UPDATE: I almost found solution. When TTwainSource finishes processing of TWAIN events it sets ENABLED=false for TTwainsource. Unfortunately inside of OnTwainAcquire it is still True, it became False later and there is no event where i can check it. Like workaround i can check it by timer.</p>