Support Center

TwainControl.SelectScanner dialog window lost in the back

Juan Zamudio Feb 19, 2013 05:51PM EST

We are using ImageMan Twain 2.8, we created a control in VS2010, this control has a top row for buttons and in the second row in the left uses the ThumbNailViewer and on the right uses the ImageViewer. In the top row we have a button to select the scanner, this buttons just call the method TwainControl.SelectScanner.

In our app, we are opening our custom control as a modal dialog, then the user clicks the select scanner button, at this point if the mouse pointer moves over the ThumbNailViewer the select scanner dialog gets pushed to the back, the only way to get it back is using Alt+Tab (which most of our users don't know exists), and since our control is been using as a modal dialog the app appears to hang forever.

Is there a a way to prevent the ThumbNailViewer to steal the focus?, or how can we solve this?

Thanks for your time.

7 Data Techniques Responses and 5 Community Responses

Up -1 Rated Down
DTI Support  Data Techniques Employee Feb 19, 2013 05:59PM EST

Hello,

You need to set the Twain Control's DisplayHandle property to the handle for your application's main form or the form you wish to be the parent window.

Thanks for your interest in our products and please let us know if you have any questions.

Sincerely,
Sean
Data Techniques Support

Up 3 Rated Down
Juan Zamudio  Data Techniques Employee Feb 20, 2013 05:49PM EST

I tried setting the DisplayHandle property to the Control hosting TwainControl, to the form hosting my custom control, and to the Mdi, in every case its still the same result, the select scanner dialog get pushed back when the mouse pointer is over TwainControl.
If you have the time, this is a small demo with the issue

https://skydrive.live.com/redir?resid=C276FE12455DB77D!127&authkey=!AE7YORqIeQEkUy0

And this is a resumed version of our control
https://skydrive.live.com/redir?resid=C276FE12455DB77D!126&authkey=!AMvULH3RnTFz2hA

Thanks for your time

Up 3 Rated Down
DTI Support  Data Techniques Employee Feb 21, 2013 09:41AM EST

Hi,

For some reason I had a problem downloading your sample.

Look in your code to see if you are setting the focus in one of the mouse handlers for the Thumbnail control. That would take focus away from the Select Scanner dialog.

Thanks for your interest in our products and please let us know if you have any questions.

Sincerely,
Sean
Data Techniques Support

Up 5 Rated Down
Juan Zamudio  Data Techniques Employee Feb 25, 2013 02:49PM EST

I only had one event, Thumbnail click, I removed it but the behavior continues.

I updated the link to my code
https://skydrive.live.com/redir?resid=C276FE12455DB77D!125

I hope you can see it

Thanks for your time

Up 0 Rated Down
DTI Support  Data Techniques Employee Feb 25, 2013 04:48PM EST

Hello,

I will look at your code shortly and let you know what I found out.

Thanks,
Sean

Up 0 Rated Down
DTI Support  Data Techniques Employee Feb 26, 2013 01:14PM EST

Hi,

I would suggest updating to the latest ImageMan.Net Code (Version 2.15) and the ImageMan.Net Twain Version 3.12 from the My Products page on our website at http://www.data-tech.com/myproducts.aspx.

There were a couple of issues that were fixed that could cause this problem in the older code you are currently using.

Sean

Up 0 Rated Down
Juan Zamudio  Data Techniques Employee Feb 26, 2013 02:44PM EST

I will try it, but I think our license is only good for the 2.xx versions.

Thanks for your time.

Up 0 Rated Down
DTI Support  Data Techniques Employee Feb 26, 2013 02:51PM EST

Hello,

Your license for the Twain Control is good for Version 3.xx as well.



Sean

Up 0 Rated Down
Juan Zamudio  Data Techniques Employee Feb 26, 2013 05:14PM EST

You are right, downloaded Twain version 3.12 and registered correctly and the problem is gone!!!.

Is there a direct link to the ImageMan.Net 2.15 version?, I have 2.10 on my machine and in the page I can only see the 3.14 version.

Thanks a lot for your time.

Up -2 Rated Down
DTI Support  Data Techniques Employee Feb 27, 2013 09:13AM EST

Hello,

Whats your serial # and I'll check your account access.

Thanks,
John

Up 0 Rated Down
Juan Zamudio  Data Techniques Employee Feb 27, 2013 02:11PM EST

Is it safe to post here the serial#?, or can i send you an email?

Thanks.

Up 1 Rated Down
DTI Support  Data Techniques Employee Feb 27, 2013 02:13PM EST

Hi,

You can email me the serial # at support@data-tech.com

Thanks,
Sean

This question is closed to new answers.

Contact Us