VintaSoft Twain .NET SDK v10.2
SetResolution Method (Device)




Vintasoft.WpfTwain Namespace > Device Class : SetResolution Method
Horizontal resolution, in pixels per inch.
Vertical resolution, in pixels per inch.
Sets the resolution of images for current scan session.
Syntax
'Declaration
 
Public Sub SetResolution( _
   ByVal horizontal As Single, _
   ByVal vertical As Single _
) 
'Usage
 
Dim instance As Device
Dim horizontal As Single
Dim vertical As Single
 
instance.SetResolution(horizontal, vertical)
public void SetResolution( 
   float horizontal,
   float vertical
)
public: void SetResolution( 
   float horizontal,
   float vertical
) 
public:
void SetResolution( 
   float horizontal,
   float vertical
) 

Parameters

horizontal
Horizontal resolution, in pixels per inch.
vertical
Vertical resolution, in pixels per inch.
Exceptions
ExceptionDescription
Thrown if device is in wrong state.
Thrown if device does not support capability.
Thrown if the .NET debugger is used and the function evaluation requires all threads to run.
Remarks
Call this property only when device is opened (State == DeviceState.Opened).

Supported resolutions can be received by the GetSupportedHorizontalResolutions method.

Important: Use this method if you cannot use the Resolution property, for example, in JavaScript.
Requirements

Target Platforms: Windows 8, Windows 7, Windows Vista, Windows XP, Windows Server 2012, Windows Server 2008, Windows Server 2003

See Also

Reference

Device Class
Device Members
Resolution Property