Leadtools.Twain Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
DefaultValue Property
See Also  Example
Leadtools.Twain Namespace > TwainRangeCapability Class : DefaultValue Property



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

Syntax

Visual Basic (Declaration) 
Public Property DefaultValue As Object
Visual Basic (Usage)Copy Code
Dim instance As TwainRangeCapability
Dim value As Object
 
instance.DefaultValue = value
 
value = instance.DefaultValue
C# 
public object DefaultValue {get; set;}
C++/CLI 
public:
property Object^ DefaultValue {
   Object^ get();
   void set (Object^ value);
}

Return Value

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

Example

Visual BasicCopy Code
Public Sub DefaultValuePropertyExample(ByVal parent As IWin32Window)
   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
C#Copy Code
public void DefaultValuePropertyExample(IWin32Window 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(); 
}

Remarks

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

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also