Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, August 3, 2009 9:21:43 PM(UTC)

Realnck  
Realnck

Groups: Registered
Posts: 7


I have the last version of the framework (16.5). I am developing a custom form in C#2008. When I set a capability it works fine, but when I shut-down the session and I startup session again the capability is reset to the old value.

If I change the value of a capability from the Twain interface of the scanner driver the capability doesn't reset when I restart session.

What is the problem with my custom form?
I have follow the steps of the examples you have.
In the example of the SDK "01 C# Twain Capabilities and Fast Twain Demo 32-bit (VS 2005 Project)" occurs the same, when I change a capability, and I restart session its reset the value changed to the old value.
I need to use other method than SetCapability?

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, August 4, 2009 4:07:57 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

The behavior depends on the Twain driver. Capability values are not guaranteed to be retained between sessions.
You can either set all the capabilities you need every time you initiate a new session, or you could use the SaveTemplateFile/LoadTemplateFile functions to do that.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#3 Posted : Wednesday, August 5, 2009 12:05:05 AM(UTC)

Realnck  
Realnck

Groups: Registered
Posts: 7


Thanks!
Now I use the SaveTemplateFile/LoadTemplateFile and it works.
I have detected that the order in which the properties are loaded, fail to assign a correct value to the TwainCapabilityType.ImageXResolution property because after it is loaded correctly, the property TwainCapabilityType.ImageXScaling loads and change the value of the ImageXResolution. I think this may be a bug.
Now to make it work propertly I have stored the value of the ImageXResolution and after all the load process is done I reassign the value.
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.056 seconds.