Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, August 17, 2009 6:04:27 AM(UTC)
annyou88

Groups: Registered
Posts: 13


Hi,

I am trying to write a scanning module that will allow multiple page (batch) scanning from the scanner feeder. I'd like to be able to detect when the user cancelled the scanning (when the user clicks the Cancel button in the Twain Driver progress dialog), as I have some custom code to handle each page scanning, and I'd like to be able to do some clean-up, as well as update my own user interface.

However, the TwainSession Acquire() method always return DialogResult.OK even if the user clicks the Cancel button. It seems to me LeadTools is handling the Cancel event, and is handling it gracefully. But I'd still like to be able to be notified of the Cancel event or status. Is there a way to get that from LeadTools?

Or, am I supposed to use AcquireFast() for this purpose? I did see there is a Cancel property for TwainAcquireMultiPageEventArgs class, but I'm not sure how I'm supposed to use that. Is there an example somewhere?

Thank you,

Ann
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, August 18, 2009 5:30:40 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

If the Twain driver returns a success code to our toolkit, we will not be able to detect that the user canceled scanning with some pages left.

If you want to know if the feeder still has pages after the successful return of the Acquire functions, check the CAP_FEEDERLOADED Twain capability.

Note:
The Cancel property used with the AcquireFast() function is not related. It is means for programmatic aborting of scanning.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.053 seconds.