Setup screen hanging application

Discussions about TWAIN scanning in GdPicture.NET using GdPictureImaging.
Post Reply
NickHallas
Posts: 3
Joined: Fri Aug 03, 2018 1:45 pm

Setup screen hanging application

Post by NickHallas » Fri Aug 03, 2018 2:01 pm

I have a WPF application from which I'm trying to invoke the Twain setup configuration dialog. I'm using code like:

Code: Select all

var handle = new System.Windows.Interop.WindowInteropHelper(this);
using (var picture = new GdPicture14.GdPictureImaging())
{
    picture.TwainOpenDefaultSource(handle.Handle);
    picture.TwainShowSetupDialogSource(handle.Handle);
    picture.TwainCloseSource();
}
This puts the scanner's dialog up OK. However, when I close the dialog, my UI is no longer responsive. My suspicion is that it's connected with the window handle from the WPF application.

Scanning itself is working OK; it just seems to be the setup dialog.

If it helps, the scanner is a Fujitsu, coming up as PaperStream IP fi-6670dj, and I'm using GDPicture 14.0.0.60.

Any suggestions welcome.

NickHallas
Posts: 3
Joined: Fri Aug 03, 2018 1:45 pm

Re: Setup screen hanging application

Post by NickHallas » Fri Aug 03, 2018 2:53 pm

Actually; on further investigation, it's a little more complex. The UI is mostly active, but the highlighting of buttons control as the mouse is moved over no longer works, so it gives the impression of being inactive.

Clicking a button does invoke the handler.

Closing the window (which is the main application window) makes it disappear from the screen and task bar, but the application itself remains running with no UI displayed.

NickHallas
Posts: 3
Joined: Fri Aug 03, 2018 1:45 pm

Re: Setup screen hanging application

Post by NickHallas » Fri Aug 03, 2018 3:43 pm

Another update on this - I've got it forking by creating a hidden WinForm window, and using that to provide the window handle.

(But that really is a hack).

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest