AcquireMulti Example for Visual Basic
Private Sub RasterTwain_AcquireMultiEvent(ByVal nPage As Integer, ByVal bstrFileName As String, ByVal bFinishScan As Boolean)
Dim strMsg As String
If bFinishScan Then
strMsg = "The page # " + CStr(nPage) + " is scanned and saved to file name " + bstrFileName
MsgBox strMsg
End If
End Sub
Private Sub Command1_Click()
Dim nRet As Integer
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:\Twain\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