TWAIN sample hangs when scanning two pages
TWAIN sample hangs when scanning two pages
Using twain sample CS that comes with the product, I attempted to try scanning two pages (without duplex mode), from the Panasonic KV-S1025C.
When I click Demo1 or Demo2, scanning a single page, there is no problem. If there is no paper, it shows an error as expected.
First problem is that the main application disappears (it appears to have been moved to back of all other applications).
Q: Why does it loose focus? Can I stop this from happening?
When I click Demo3 or Demo4 or Demo5, scanning multiple pages, then the first two pages run through correctly and the application hangs up. The call to TwainAcquireToGdPictureImage never returns.
ImageID = oGdPictureImaging.TwainAcquireToGdPictureImage(this.Handle);
Q: How can I prevent this from happening? Why does it happen?
Q: Is there an event raised during scanning for determining progress?
When I click Demo1 or Demo2, scanning a single page, there is no problem. If there is no paper, it shows an error as expected.
First problem is that the main application disappears (it appears to have been moved to back of all other applications).
Q: Why does it loose focus? Can I stop this from happening?
When I click Demo3 or Demo4 or Demo5, scanning multiple pages, then the first two pages run through correctly and the application hangs up. The call to TwainAcquireToGdPictureImage never returns.
ImageID = oGdPictureImaging.TwainAcquireToGdPictureImage(this.Handle);
Q: How can I prevent this from happening? Why does it happen?
Q: Is there an event raised during scanning for determining progress?
Re: TWAIN sample hangs when scanning two pages
Hi,
Please give us a log & check some things described here: viewtopic.php?t=1486
Kind regards,
Loïc
Please give us a log & check some things described here: viewtopic.php?t=1486
Kind regards,
Loïc
Re: TWAIN sample hangs when scanning two pages
Having downloaded the latest version from your web-site and uninstalled and reinstalled the application and samples, I recompiled and ran again. This time, whilst the main form still gets moved to the back of the display order, the scanning processes completed successfully. Either you've fixed the problem in your code, or perhaps the action of uninstall and reinstall solved the problem. This may relate to the fact that I originally installed your component a few weeks ago and recently installed the scanner driver.
As for the problem of the main form jumping to the back of the display order, I suspect that the problem is with the hiding of the UI for the scanner driver. I think it appears and then disappears a moment later and the focus is given to the next application in the windows order, rather than back to the sample application.
To solve this, I changed all references of this.Handle to IntPtr.Zero and the problem went away.
As for the problem of the main form jumping to the back of the display order, I suspect that the problem is with the hiding of the UI for the scanner driver. I think it appears and then disappears a moment later and the focus is given to the next application in the windows order, rather than back to the sample application.
To solve this, I changed all references of this.Handle to IntPtr.Zero and the problem went away.
Re: TWAIN sample hangs when scanning two pages
Hi,
Thank you for the feedback.
For the window displayed in bottom, it is a known issue which should be resolved into the next release.
Kind regards,
Loïc
Thank you for the feedback.
For the window displayed in bottom, it is a known issue which should be resolved into the next release.
Kind regards,
Loïc
Re: TWAIN sample hangs when scanning two pages
I have an evaluation version of gdpicture.net version 7 and I have the same problem. The main application window disappears when scanning more than one page. If I set handle to 0 then the problem goes away. My only problem with this is that the documentation says setting handle to 0 would be a problem with Citrix and I have no way of knowing for sure if we would ever have a client using citrix.
Re: TWAIN sample hangs when scanning two pages
Hi,
Also, in Citrix you can use 0 for the window handle. The document just states that if a windows is used it must be a top-level window or a child of a top level window.
Kind regards,
Loïc
Do you mean the windows is destroyed or simply lost the focus ?The main application window disappears when scanning more than one page
Also, in Citrix you can use 0 for the window handle. The document just states that if a windows is used it must be a top-level window or a child of a top level window.
Kind regards,
Loïc
Re: TWAIN sample hangs when scanning two pages
The window loses focus. It is still on the taskbar but not in the alt-tab. If using 0 for handle is not a problem then I can just go that route.
Thank you,
dbrudno.
Thank you,
dbrudno.
Who is online
Users browsing this forum: No registered users and 2 guests