soukoku / ntwain

A TWAIN lib for dotnet.
MIT License
117 stars 47 forks source link

How to hide dialog of device when using NTWAIN with Windows Service? #19

Closed lnvu1983 closed 3 years ago

lnvu1983 commented 3 years ago

Anyone know the way to by pass the dialog of device displayed when scanning? It's ok if there is no problem during scan. But if there is an error (ex: PaperJam or No Paper, ...), this will hang the windows service (the dialog require user to take an action to close)

Sample error dialog of device:

kodak-error

Tks a lot

soukoku commented 3 years ago

If the scanner supports it, you can try setting CAP_INDICATORS to false through Capabilities.CapIndicators.SetValue() on the source.

lnvu1983 commented 3 years ago

If the scanner supports it, you can try setting CAP_INDICATORS to false through Capabilities.CapIndicators.SetValue() on the source.

Thanksssssssssssss, work like a charm. Love you so much :)