VintaSoft Twain .NET SDK Discussions
Questions, comments and suggestions concerning VintaSoft Twain .NET SDK.
Board index < VintaSoft Twain < VintaSoft Twain .NET SDK Discussions
Public Sub ScanWithUI()
' set the application name
VSTwain1.AppProductName = "MyTwainApplication"
Try
' initialize the library
VSTwain1.StartDevice
' show "Select Source" dialog
VSTwain1.SelectSource
' enable the user interface (false - disable the user interface)
VSTwain1.ShowUI = true
' start asynchronous acquisition process
VSTwain1.Acquire
Catch ex As TwainException
MsgBox ex.Message
End Try
End Sub
...
Private Sub VSTwain1_ScanCompleted(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles VSTwain1.ScanCompleted
' show error message if error occur
If VSTwain1.ErrorCode <> ErrorCode.None Then
If VSTwain1.ErrorCode = ErrorCode.FeederProblem Then
MsgBox("Paper is jammed or double feeded.")
End If
' show message "Scan process is completed."
Else
MsgBox("Scan process is completed.")
End If
End Sub
Best regards, Alexander