Leadtools TWAIN (Leadtools.Twain assembly)
LEAD Technologies, Inc

DefaultValue Property

Example 





Gets the default value in the range contained in the TwainRangeCapability object.
Syntax
public object DefaultValue {get; set;}
'Declaration
 
Public Property DefaultValue As Object
'Usage
 
Dim instance As TwainRangeCapability
Dim value As Object
 
instance.DefaultValue = value
 
value = instance.DefaultValue
public object DefaultValue {get; set;}
 get_DefaultValue();
set_DefaultValue(value);
public:
property Object^ DefaultValue {
   Object^ get();
   void set (    Object^ value);
}

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
 
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
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();
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

TwainRangeCapability Class
TwainRangeCapability Members

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.