ntwain
ntwain copied to clipboard
How to keep the UI displayed
_twain.CurrentSource.Enable(SourceEnableMode.ShowUI, true, this.Handle) After scanning one, the scanner interface will be closed automatically. Is there any way to keep it open because I want to scan continuously @soukoku @soukoku
Am also trying to figure this out. Did you have any luck figuring it out?
I've figured it out. TransferLogic.cs This section of code -
// some poorly written scanner drivers return failure on EndXfer so also check for pending count now.
// this may break with other sources but we'll see
if (//pending.Count == 0 &&
session.State > 5)
{
session.ChangeState(5, true);
session.DisableSource();
}
You can comment out session.DisableSource();
.
It is currently designed to disable the source which closes the UI as soon as it finishes the transfer.