Как установить значение параметров устройства для TWAIN-сканера?
В этом разделе
Вот пример, который демонстрирует, как включить режим двусторонней печати, используя возможности устройства:
public void SetDuplexEnabledCapValue(Vintasoft.Twain.Device device)
{
// open the device
device.Open();
// get reference to object that manipulates DuplexEnabled capability
Vintasoft.Twain.DeviceCapability duplexEnabledCap = device.Capabilities.Find(Vintasoft.Twain.DeviceCapabilityId.DuplexEnabled);
// if DuplexEnabled capability supported
if (duplexEnabledCap != null)
{
// set value of DuplexEnabled capability
duplexEnabledCap.SetValue(true);
}
}
Public Sub SetDuplexEnabledCapValue(ByVal device As Vintasoft.Twain.Device)
' open the device
device.Open()
' get reference to object that manipulates DuplexEnabled capability
Dim duplexEnabledCap As Vintasoft.Twain.DeviceCapability = device.Capabilities.Find(Vintasoft.Twain.DeviceCapabilityId.DuplexEnabled)
' if DuplexEnabled capability supported
If duplexEnabledCap IsNot Nothing Then
' set value of DuplexEnabled capability
duplexEnabledCap.SetValue(True)
End If
End Sub