ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Moving from V6 to V7.5: selecting twain source
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

mastinf

Italy
46 Posts

Posted - Dec 20 2017 :  05:24:22  Show Profile  Reply
In my project i use a preview form that allows the user to select the frame to acquire.

It's similar to the demo i have created in the user demo thread of the forum: http://www.imageen.com/files/other/Scan_Selection.zip

It happens that, in V7.5, the preview form connects to the wrong scanner (i have two: one is USB and one is connected to LAN)

In the main form i select the default scanner using the following code:

img.io.TWainParams.SelectedSource:=
img.io.TwainParams.GetDefaultSource;

img is a TImageEnView object.

The default scanner is the usb scanner but the preview form acquire the image from the network scanner.


The only way i have found to make it work correctly is to place the following code in the preview form:

preview.io.TWainParams.SelectedSource:=
preview.io.TwainParams.GetDefaultSource;

preview is a TImageEnView object

Is this necessary in the latest version ? Or is it a bug ?

And i really don't understand why my demo app works fine also if i don't select again the scanner in the preview form. It works as it is. Seems there's something different in my application but can't understant what. It was working fine with ImageEn V6

thanks for any suggestion

Roberto

Roberto Nicchi
Master Informatica
Italy

mastinf

Italy
46 Posts

Posted - Dec 20 2017 :  14:17:45  Show Profile  Reply
I read in ImageEn changes history in Ver. 7.5 Fixed: TWainParams.SelectedSource doesn't work correctly
Maybe could be this the cause of the changed behaviour ?

Roberto Nicchi
Master Informatica
Italy
Go to Top of Page

xequte

39145 Posts

Posted - Dec 23 2017 :  15:37:33  Show Profile  Reply
Hi Roberto

Sorry, we cannot replicate. Executing the following, correctly selects and acquires from the default device:

  imageenview1.io.TwainParams.SelectedSource := imageenview1.io.TwainParams.GetDefaultSource();
  imageenview1.io.Acquire();


I note that you are using two different TImageEnView objects (each has its own IO.TwainParams). I assume you are aware that setting "img.io.TwainParams.SelectedSource" does not change the selection of "preview.io.TwainParams.SelectedSource".

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

mastinf

Italy
46 Posts

Posted - Dec 24 2017 :  04:35:06  Show Profile  Reply
ok, i understand now that to select the source is necessary or the component will use the first source in the list that is not necessary the default device selected. Correct ?
thanks

Roberto Nicchi
Master Informatica
Italy
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: