FastConfigEvent Example for Visual FoxPro 6
#define L_LTWAIN_SHOW_USER_INTERFACE 1
#define L_LTWAIN_USE_THREAD_MODE 8
oRasterTwain.UserFastConfigsCount = 0
oRasterTwain.EnableFastConfigEvent = .T.
nRet = oRasterTwain.FindFastConfig("c:\temp", BitOR(L_LTWAIN_SHOW_USER_INTERFACE, L_LTWAIN_USE_THREAD_MODE), 8, 5)
If nRet = 0 Then
MessageBox("Find Fast Configuration process completed")
Else
MessageBox("An error occurred while Finding Fast Configuration")
EndIf
For details about implementing the event, see the tutorial Acquiring an Image.
PROCEDURE FastConfigEvent(pltResConfig)
If pltResConfig.Success Then
str = "Transfer Mode = " + Str(pltResConfig.TransferMode) + Chr(13) + ;
"File Format = " + Str(pltResConfig.FileFormat) + Chr(13) + ;
"Buffer Size = " + Str(pltResConfig.BufferSize) + Chr(13) + ;
"Bits Per Pixel = " + Str(pltResConfig.BitsPerPixel) + Chr(13) + ;
"Required Time = " + Str(pltResConfig.RequiredTime)
MessageBox(str, 0, "Resulting Scan Configurations...")
Else
MessageBox("The tested scan configuration failed...")
EndIf
oRasterTwain.StopFindFastConfig = .F.
ENDPROC