←Select platform

Capability Property

Summary
Gets the TwainCapability currently being processed by the event.

Syntax
C#
C++/CLI
Python
public TwainCapability Capability { get; } 
public: 
property TwainCapability^ Capability { 
   TwainCapability^ get(); 
} 
Capability # get  (TwainTemplateEventArgs) 

Property Value

The TwainCapability currently being processed by the event.

Example
C#
using Leadtools; 
using Leadtools.Twain; 
 
 
public void twnSession_SaveTemplate(object sender, TwainTemplateEventArgs e) 
{ 
   TwainCapability twCap = e.Capability; 
   if (twCap.Information.ContainerType == TwainContainerType.OneValue) 
   { 
      if (twCap.OneValueCapability.Value == (object)TwainCapabilityValue.TransferMechanismFile) 
      { 
         MessageBox.Show("File transfer avaialble and its container is OneValue"); 
      } 
   } 
} 
 
public void CapabilityPropertyExample(IntPtr parent) 
{ 
   TwainSession session = new TwainSession(); 
   session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None); 
 
   session.SaveTemplate += new EventHandler<TwainTemplateEventArgs>(twnSession_SaveTemplate); 
   session.SaveTemplateFile(Path.Combine(LEAD_VARS.ImagesDir, "Out_test.ltt")); 
 
   session.Shutdown(); 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS23\Resources\Images"; 
} 
Requirements

Target Platforms

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Twain Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.