DefaultValue Property

Summary
Gets the default value in the range contained in the TwainRangeCapability object.
Syntax
C#
VB
C++
public object DefaultValue { get; set; } 
Public Property DefaultValue As Object 
public: 
property Object^ DefaultValue { 
   Object^ get(); 
   void set (    Object^ ); 
} 

Property Value

The default value in the range contained in the TwainRangeCapability object.

Remarks

For more information, refer to How to Work with the Container.

Example
C#
VB
using Leadtools; 
using Leadtools.Twain; 
 
public void DefaultValuePropertyExample(IntPtr parent) 
{ 
   TwainSession twnSession = new TwainSession(); 
   twnSession.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None); 
 
   TwainCapability twCap = new TwainCapability(); 
 
   twCap.Information.ContainerType = TwainContainerType.Range; 
   twCap.Information.Type = TwainCapabilityType.ImageJpegQuality; 
 
   twCap.RangeCapability.ItemType = TwainItemType.Int16; 
   twCap.RangeCapability.CurrentValue = TwainCapabilityValue.JpegQualityMedium; 
   twCap.RangeCapability.DefaultValue = TwainCapabilityValue.JpegQualityHigh; 
   twCap.RangeCapability.MinimumValue = 0; 
   twCap.RangeCapability.MaximumValue = 50; 
 
   twCap.RangeCapability.StepSize = 10; 
 
   twnSession.SetCapability(twCap, TwainSetCapabilityMode.Set); 
   twnSession.Shutdown(); 
} 
Imports Leadtools 
Imports Leadtools.Twain 
 
Public Sub DefaultValuePropertyExample(ByVal parent As IntPtr) 
   Dim twnSession As TwainSession = New TwainSession() 
   twnSession.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None) 
 
   Dim twCap As TwainCapability = New TwainCapability() 
 
   twCap.Information.ContainerType = TwainContainerType.Range 
   twCap.Information.Type = TwainCapabilityType.ImageJpegQuality 
 
   twCap.RangeCapability.ItemType = TwainItemType.Int16 
   twCap.RangeCapability.CurrentValue = TwainCapabilityValue.JpegQualityMedium 
   twCap.RangeCapability.DefaultValue = TwainCapabilityValue.JpegQualityHigh 
   twCap.RangeCapability.MinimumValue = 0 
   twCap.RangeCapability.MaximumValue = 50 
 
   twCap.RangeCapability.StepSize = 10 
 
   twnSession.SetCapability(twCap, TwainSetCapabilityMode.Set) 
   twnSession.Shutdown() 
End Sub 
Requirements

Target Platforms

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

Leadtools.Twain Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.