Stop acquiring images only from the feeder of the TWAIN source.
public void StopFeeder()Public Sub StopFeeder()public:void StopFeeder();
This method stops the process of acquiring images using one of the following methods: Acquire
In order to stop acquiring images with the Acquire or AcquireToImage, call this method in the AcquirePage event when it is fired.
In order to stop acquire images by calling the AcquireFast, call this method in the AcquireMultiPage event when it is fired.
If the TWAIN source has no feeder, then this method will fail and an exception is thrown.
Imports LeadtoolsImports Leadtools.TwainDim acq_session As TwainSessionPrivate Sub twain_AcquirePage(ByVal sender As Object, ByVal e As TwainAcquirePageEventArgs)' get acquired image here' call StopFeeder method here if you need to stop the feederacq_session.StopFeeder()End SubPublic Sub AcquireExample(ByVal parent As IntPtr)acq_session = New TwainSession()acq_session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None)acq_session.SelectSource(String.Empty)Dim props As TwainProperties = acq_session.PropertiesDim dataProps As TwainDataTransferProperties = props.DataTransferdataProps.FileName = Path.Combine(LEAD_VARS.ImagesDir, "twain.bmp")dataProps.MemoryBufferSize = dataProps.MemoryBufferSize * 2props.DataTransfer = dataPropsacq_session.Properties = propsDim opts As TwainTransferOptions = acq_session.TransferOptionsAddHandler acq_session.AcquirePage, AddressOf twain_AcquirePageIf acq_session.Acquire(TwainUserInterfaceFlags.Show) <> DialogResult.OK ThenMessageBox.Show("Error Acquiring From Source")End Ifacq_session.Shutdown()End SubPublic NotInheritable Class LEAD_VARSPublic Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"End Class
using Leadtools;using Leadtools.Twain;TwainSession acq_session;private void twain_AcquirePage(object sender, TwainAcquirePageEventArgs e){// get acquired image here// call StopFeeder method here if you need to stop the feederacq_session.StopFeeder();}public void AcquireExample(IntPtr parent){acq_session = new TwainSession();acq_session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None);acq_session.SelectSource(String.Empty);TwainProperties props = acq_session.Properties;TwainDataTransferProperties dataProps = props.DataTransfer;dataProps.FileName = Path.Combine(LEAD_VARS.ImagesDir, "twain.bmp");dataProps.MemoryBufferSize = dataProps.MemoryBufferSize * 2;props.DataTransfer = dataProps;acq_session.Properties = props;TwainTransferOptions opts = acq_session.TransferOptions;acq_session.AcquirePage += new EventHandler<TwainAcquirePageEventArgs>(twain_AcquirePage);if (acq_session.Acquire(TwainUserInterfaceFlags.Show) != DialogResult.OK)MessageBox.Show("Error Acquiring From Source");acq_session.Shutdown();}static class LEAD_VARS{public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images";}
|
Products |
Support |
Feedback: StopFeeder Method - Leadtools.Twain |
Introduction |
Help Version 19.0.2017.3.22
|

Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.