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?
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.
Thank you for the feedback.
For the window displayed in bottom, it is a known issue which should be resolved into the next release.
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.
Who is online
Users browsing this forum: Bing [Bot] and 1 guest