Click or drag to resize

AcquisitionDeviceEvent Event

This event will fire when the device sends one of the DeviceEventFlags.

Namespace:  Atalasoft.Twain
Assembly:  Atalasoft.DotTwain (in Atalasoft.DotTwain.dll) Version: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax
public event DeviceEventHandler DeviceEvent

Value

Type: Atalasoft.TwainDeviceEventHandler
Remarks
You have to setup which events you want to receive, if any, by setting the DeviceEvents property of a Device object.
Examples
DeviceEventCS (C#)
private void acquisition_DeviceEvent(object sender, Atalasoft.Twain.DeviceEventArgs e)
{
    // One of the many device events has fired.
    // You will only receive the events you have set using
    // the Device.DeviceEvents property.
    if (e.Event == DeviceEventFlags.PaperJam)
        MessageBox.Show(this, "Paper jam!!!");
    else
        MessageBox.Show(this, "Device Event:  " + e.Event.ToString());
}
DeviceEventVB (Visual Basic)
Private  Sub acquisition_DeviceEvent(ByVal sender As Object, ByVal e As Atalasoft.Twain.DeviceEventArgs)
    ' One of the many device events has fired.
    ' You will only receive the events you have set using
    ' the Device.DeviceEvents property.
    If e.Event = DeviceEventFlags.PaperJam Then
        MessageBox.Show(Me, "Paper jam!!!")
    Else 
        MessageBox.Show(Me, "Device Event:  " + e.Event.ToString())
    End If
End Sub
See Also