saraff-9EB1047A4BEB4cef8506B29BA325BD5A / Saraff.Twain.NET

Saraff.Twain.NET is the skillful scanning component which allows you to control work of flatbed scanner, web and digital camera and any other TWAIN device from .NET environment. You can use this library in your programs written in any programming languages compatible with .NET technology.
GNU General Public License v3.0
102 stars 35 forks source link

Can't hide progressbar in no ui command line access #88

Closed alexaport closed 2 years ago

alexaport commented 2 years ago

Hello, I'm implementing this to scan in my c# application but when I start on scan I get this transferring data window, I want to hide it and focus on my app with my internal progress bar.

Link of current issue window: https://prnt.sc/22r93ct

I'll be thankful if you can help me with this.

saraff-9EB1047A4BEB4cef8506B29BA325BD5A commented 2 years ago

Hello, @alexaport See the Alternative User Interfaces and the Saraff.Twain.Sample2 from the Saraff.Twain.NET CS Samples

alexaport commented 2 years ago

Getting the same window in example 2 also. Check the screenshot below : https://prnt.sc/22r9m2u

I'll be thankful if you can guide me to hide this progress bar or tell me where to edit the source code of Saraff.Twain.dll

saraff-9EB1047A4BEB4cef8506B29BA325BD5A commented 2 years ago

Try set the CAP_INDICATORS capability to the FALSE (see Strongly typed accessing to a capabilities )

CAP_INDICATORS

Description

If TRUE, the Source displays a progress indicator during acquisition and transfer, regardless of whether the Source's user interface is active. If FALSE, the progress indicator is suppressed if the Source's user interface is inactive. The Source displays device-specific instructions and error messages if either the user interface or progress indicator is turned on. In this case it returns TWCC_OPERATIONERROR to alert the application that it handled the error, and communicated the problem to the user. If both the user interface and progress indicator are turned off, then the Source never displays any message to the user, even if TWCC_OPERATIONERROR is returned. Messages to the user are under the sole control of the Application.

Application

If the application plans to enable the Source with TW_USERINTERFACE. ShowUI = FALSE, it can also suppress the Source’s progress indicator by using this capability.

Values

TWAIN 2.4 Specification 10-63

alexaport commented 2 years ago

it worked. Thanks is not enough but really really thanks a lot for quick and super support