Closed ZecaAdegas closed 1 year ago
Hello, @ZecaAdegas About "to stay in the menu", it possible. Invoke the Twain.Acquire() method in loop. For more information see:
About " way to know specifically when the scanner has started scanning", it possible, see:
As for the first issue, I read about the states of TWAIN. In order to not immediately close the console app, closing the source after a scan and opening again could fix the exit of the app?
As for the second issue, I could not understand how the links would apply to this scenario.
Thank you for your patience!
Hello, @ZecaAdegas About "closing the source after a scan", yes, it could fix.
About "way to know specifically when the scanner has started scanning", in buffered memory mode transfer for each image is raised SetupMemXferEvent event before obtaining, and is raised MemXferEvent event during receiving. After completion of scanning is raised AcquireCompleted event.
Ahhh okay, thank you for explaining!
I can only test this out on monday so can't test right now but you can close the issue, with this help I think I can resolve these problems!
Hello!
I have now tried both suggestions to the problems and both have not worked. Closing the data source does not prevent the exit of the console app after one scan (if called in loop closes after the number of scans intended), and both the SetupMemXferEvent and MemXferEvent have not worked (I want to print to the console something like "Started scanning").
Do you have any further suggestions?
Hello, @ZecaAdegas Try see Saraff.Twain.NET CS Samples
Are you set the XferMech capability to TwSX.Memory?
Hello @saraff-9EB1047A4BEB4cef8506B29BA325BD5A !
I am following the Sample 3. In this sample the program always exits after one scan, which is the same behaviour that I have (but I have a loop for the menu that is not working).
As for the XferMech capability, setting this makes it so that I cannot save the scan to a location (desktop such as your example), and with using the MemXferEvent or SetupMemXferEvent, both only print out after the scan has finished.
Hello, @ZecaAdegas Try see the Sample 2. It had the loop and the XferMech samples.
Hello!
I am having an issue where I want to stay in the "menu" after a scan, where the program immediatly closes, even if I have a loop reading key press waiting for a specific key to exit. I want to have this behaviour, instead of exiting after 1 scan or 5. Is there a way to stop this automatic closing of the program?
Also, is there a way to know specifically when the scanner has started scanning? I currently only know when it has started and ended.
Thank you!