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
 Remembering TWAIN Settings
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Elemental

USA
56 Posts

Posted - Nov 22 2019 :  11:46:31  Show Profile  Reply
I have made posts before about storing TWAIN settings to a local file, but I feel as if I'm doing more work than I'm supposed to. All I want is for my application to remember which TWAIN device was last picked by the user and what their custom settings were.

For example, when I use Twack_32 (by the TWAIN working group), it remembers my last selected scanner and scan settings, without any apparent change to the registry or modifying any local files. How does it do that? I want my application to do that, too.

xequte

38611 Posts

Posted - Nov 23 2019 :  15:15:14  Show Profile  Reply
Hi

Have you set the default source?

https://www.imageen.com/help/TIETwainParams.GetDefaultSource.html

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

Elemental

USA
56 Posts

Posted - Nov 25 2019 :  11:58:36  Show Profile  Reply
It seems that Twack_32.exe does more than that. Allow me to elaborate.

The TWAIN driver for my HP 5590 saves settings in presets. These presets are listed in the first tab of the TWAIN dialog. Whenever I use ImageEn to set the TWAIN properties of the scanner, based on settings I saved in a custom text file, the HP driver goes and creates a new preset. If I run my application 20 times, I end up with 20 new presets.

Twack_32, however, doesn't do that. It not only remember which TWAIN device I last selected in that program, but also which preset. It doesn't create new ones or modify old ones. I want my application to do that, too. And I have to believe that Twack_32 was not written just with HP TWAIN drivers in mind. How can I use ImageEn to replicate that functionality?
Go to Top of Page

Elemental

USA
56 Posts

Posted - Nov 25 2019 :  14:12:33  Show Profile  Reply
I downloaded the Demos which have been good to see. I had forgotten about those as good resources. Now that I know how to GET the default TWAIN device, how do I make my software SET the default device?
Go to Top of Page

xequte

38611 Posts

Posted - Nov 26 2019 :  16:34:08  Show Profile  Reply
Hi

The process for that is not part of the Twain standard, so not a method available in ImageEn. There may be a general method to set it in Windows with other Delphi code.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: