Acquire Example for Visual FoxPro 6
#define L_LTWAIN_SHOW_USER_INTERFACE 1
oRasterTwain.FileTransferName = "c:\twain.bmp"
oRasterTwain.MemBufSize = oRasterTwain.MemBufSize * 2
nRet = oRasterTwain.Acquire(L_LTWAIN_SHOW_USER_INTERFACE)
If nRet <> 0 Then
MessageBox("Error acquiring from source")
EndIf
&& To get the image scanned by the Acquire method and pass it
&& to a LEADRasterView control, you must implement a handler
&& for the AcquirePageEvent. For details, see the tutorial Acquiring an Image.
DEFINE CLASS _LEADRasterTwainEvents AS custom
PROCEDURE AcquirePageEvent(pBitmap)
TheForm.RasterView1.Raster. InsertBitmapListItem(-1, pBitmap)
ENDPROC
ENDDEFINE