VintaSoft Twain .NET SDK Discussions
Questions, comments and suggestions concerning VintaSoft Twain .NET SDK.
Board index < VintaSoft Twain < VintaSoft Twain .NET SDK Discussions
Private Sub BeginAquire(ByVal pDevice As Vintasoft.Twain.Device)
Dim trdAcquire As System.Threading.Thread = New System.Threading.Thread(AddressOf AcquireThread)
trdAcquire.Start(pDevice)
End Sub
Private Sub AcquireThread(ByVal pDevice As Object)
Dim Dev As Vintasoft.Twain.Device = DirectCast(pDevice, Vintasoft.Twain.Device)
Dim ModalState As Vintasoft.Twain.AcquireModalState = AcquireModalState.None
Do
ModalState = Dev.AcquireModal() ' First time through the loop, this is run on Main Thread
Select Case ModalState
Case AcquireModalState.ImageAcquiring
While Dev.AcquiredImages.Count = 0
End While
SaveImage(Dev.AcquiredImages.Last)
Case AcquireModalState.ImageAcquired
SaveImage(Dev.AcquiredImages.Last)
Case AcquireModalState.ScanCompleted
_device_ScanCompleted(Nothing, Nothing)
Case AcquireModalState.ScanCanceled
If Dev.State = DeviceState.Opened Then
' close the device
Dev.Close()
End If
Case AcquireModalState.ScanFailed
If Dev.State = DeviceState.Opened Then
' close the device
Dev.Close()
End If
End Select
Loop While ModalState <> AcquireModalState.None
End Sub
My question is, will this continue to happen in the registered version, or does this only happen because the first call to AcquireModal is popping up the window with the "Evaluate" and "Register Now" buttons?