Gets and sets the options used for transferring data from the current TWAIN source.
public Leadtools.Twain.TwainTransferOptions TransferOptions {get; set;}Public Property TransferOptions As Leadtools.Twain.TwainTransferOptionspublic:property Leadtools.Twain.TwainTransferOptions TransferOptions {Leadtools.Twain.TwainTransferOptions get();void set ( Leadtools.Twain.TwainTransferOptions );}
Options to be used for transferring data from the current TWAIN source
Gets and sets transfer options to the selected TWAIN source. Set the following properties before calling this method: TransferMode Property FileName Property FileFormat Property CompressionMode Property
Imports LeadtoolsImports Leadtools.TwainPublic Sub TransferOptionsPropertyExample(ByVal parent As IntPtr)Dim session As TwainSession = New TwainSession()session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None)Dim opts As TwainTransferOptions = session.TransferOptionsopts.TransferMode = TwainTransferMode.Fileopts.FileName = Path.Combine(LEAD_VARS.ImagesDir, "test.bmp")opts.FileFormat = RasterImageFormat.Bmpopts.CompressionMode = TwainCompressionMode.Nonesession.TransferOptions = optsIf session.IsTransferModeAvailable(TwainTransferMode.File) ThenMessageBox.Show("File transfer is supported")End IfIf session.IsTransferModeAvailable(TwainTransferMode.Buffer) ThenMessageBox.Show("Memory transfer is supported")End IfIf session.IsTransferModeAvailable(TwainTransferMode.Native) ThenMessageBox.Show("Native transfer is supported")End Ifsession.Shutdown()End SubPublic NotInheritable Class LEAD_VARSPublic Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"End Class
using Leadtools;using Leadtools.Twain;public void TransferOptionsPropertyExample(IntPtr parent){TwainSession session = new TwainSession();session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None);TwainTransferOptions opts = session.TransferOptions;opts.TransferMode = TwainTransferMode.File;opts.FileName = Path.Combine(LEAD_VARS.ImagesDir, "test.bmp");opts.FileFormat = RasterImageFormat.Bmp;opts.CompressionMode = TwainCompressionMode.None;session.TransferOptions = opts;if (session.IsTransferModeAvailable(TwainTransferMode.File))MessageBox.Show("File transfer is supported");if (session.IsTransferModeAvailable(TwainTransferMode.Buffer))MessageBox.Show("Memory transfer is supported");if (session.IsTransferModeAvailable(TwainTransferMode.Native))MessageBox.Show("Native transfer is supported");session.Shutdown();}static class LEAD_VARS{public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images";}
|
Products |
Support |
Feedback: TransferOptions Property - 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.