| T O P I C    R E V I E W | 
              
                | Flashcqxg | Posted - Oct 31 2022 : 06:50:54 Hello,i want to stop the scan in the ImageEnMView's OnAcquireBitmap,but it can not stop.
 For example, I scan 100 sheets of paper. If an error is detected when scanning to the second sheet, I want to stop scanning, but the following code cannot prevent the scanner from continuing to scan. How can I stop scanning the scanner?
 
 procedure TFrmScan.ImageEnMViewAcquireBitmap(Sender: TObject; ABitmap: TIEBitmap; DpiX, DpiY: Integer; var Handled: Boolean);
 begin
 
 if CheckError then
 ImageEnMView.MIO.Aborting := True;
 
 end;
 
 
 | 
              
                | 13   L A T E S T    R E P L I E S    (Newest First) | 
              
                | Flashcqxg | Posted - Nov 07 2022 : 18:10:49 I email to support@xequte.com.
 Thanks.
 | 
              
                | xequte | Posted - Nov 07 2022 : 17:43:00 Hi
 
 Please email me for an update that fully supports this.
 
 Nigel
 Xequte Software
 www.imageen.com
 
 | 
              
                | Flashcqxg | Posted - Nov 06 2022 : 18:50:03 I uploaded the demo and made comments in the relevant code.
 
 attach/Flashcqxg/2022116184930_TwainStore - can not auto stop.zip
 57.57 KB
 
 
  | 
              
                | Flashcqxg | Posted - Nov 06 2022 : 18:20:15 OK, I'll make a simple demo and upload it here.
 | 
              
                | xequte | Posted - Nov 06 2022 : 18:18:41 Yes, if you want to create a very simple demo that shows the problem, we can test that here.
 
 Nigel
 Xequte Software
 www.imageen.com
 
 | 
              
                | Flashcqxg | Posted - Nov 06 2022 : 18:15:58 Thank you. Do you want me to make a demo?
 | 
              
                | xequte | Posted - Nov 06 2022 : 18:14:11 Hmm, I cannot reproduce that here. We'll need to investigate.
 
 Nigel
 Xequte Software
 www.imageen.com
 
 | 
              
                | Flashcqxg | Posted - Nov 06 2022 : 17:31:26 Hello:
 I used the Twain driver.
 | 
              
                | xequte | Posted - Nov 03 2022 : 23:16:24 Hi
 
 Is this using a Twain or WIA driver?
 
 Nigel
 Xequte Software
 www.imageen.com
 
 | 
              
                | Flashcqxg | Posted - Nov 02 2022 : 21:39:33 Hello:
 my code:
 
 
procedure TFrmScan.ImageEnMViewAcquireBitmap(Sender: TObject; ABitmap: TIEBitmap; DpiX, DpiY: Integer; var Handled: Boolean);
begin
  if CheckError then
  begin
    ImageEnMView.MIO.AcquireParams.Aborting := True;
    Handled := True;
    ShowMessage('there are errors !');
  end;
end;
When running this code, a dialogue window will pop up, and the scanner will not stop scanning until all the papers have been scanned. Why? I want to stop scanning when encountering errors and pop up a prompt dialog window.
 | 
              
                | xequte | Posted - Nov 01 2022 : 20:27:40 If Aborting is set in OnAcquireBitmap it will still add the current image to the MView. To avoid this set:
 
 Handled := True;
 
 Nigel
 Xequte Software
 www.imageen.com
 
 | 
              
                | Flashcqxg | Posted - Nov 01 2022 : 19:05:16 Hi:
 My code:
 
 
 procedure TFrmScan.ImageEnMViewAcquireBitmap(Sender: TObject; ABitmap: TIEBitmap; DpiX, DpiY: Integer; var Handled: Boolean);
begin
  if CheckError then
  begin
    ImageEnMView.MIO.AcquireParams.Aborting := True;
    ShowMessage('there are errors !');
  end;
end;
 but the scanner will scan all the paper!
 | 
              
                | xequte | Posted - Oct 31 2022 : 20:19:33 Hi
 
 To cancel scanning:
 
 ImageEnMView1.MIO.AcquireParams.Aborting := True;
 
 https://www.imageen.com/help/TIEAcquireParams.Aborting.html
 
 
 Nigel
 Xequte Software
 www.imageen.com
 
 |