|
Available in the LEADTOOLS Imaging toolkit. |
CancelAcquire Example for Visual Basic
Dim WithEvents RasterTwain As LEADRasterTwain_U
Private Sub TwainAcquire_Click()
Dim nRet As Integer
Set RasterTwain = New LEADRasterTwain_U
RasterTwain.InitSession hWnd
RasterTwain.SelectSource
RasterTwain.FastTransferMode = L_LTWAIN_BUFFER_MODE
RasterTwain.FastFormat = FILE_TIF
RasterTwain.FastBitsPerPixel = 1
RasterTwain.FastBufferSize = 0
RasterTwain.FastUsePreferredBufferSize = True
RasterTwain.EnableAcquireMultiEvent = True
nRet = RasterTwain.AcquireMulti("c:\test.tif", L_LTWAIN_SHOW_USER_INTERFACE, True)
If nRet = 0 Then
MsgBox "The Fast Twain method was successful", vbOKOnly, "Notice"
Else
MsgBox "Error occurred during the fast Twain method!!!", vbOKOnly, "Error!!!"
End If
End Sub
Private Sub RasterTwain_AcquireMultiEvent(ByVal nPage As Integer, ByVal bstrFileName As String, ByVal bFinishScan As Boolean)
RasterTwain.CancelAcquire
End Sub