Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
How to code this inVFP ??
Hi,
I have a sample code which wrote in VB. I wish to convert it into VFP.
Below is the VB Code :
Declare Function TWAIN_AcquireToFilename Lib "EZTW32.DLL" (ByVal hwndApp%, ByVal bmpFileName$) As Integer
Declare Function TWAIN_SelectImageSource Lib "EZTW32.DLL" (ByVal hwndApp&) As Long
Declare Function TWAIN_AcquireToClipboard Lib "EZTW32.DLL" (ByVal hwndApp As Long, ByVal wPixTypes As Long) As Long
Declare Function TWAIN_IsAvailable Lib "EZTW32.DLL" () As Long
Declare Function TWAIN_EasyVersion Lib "EZTW32.DLL" () As Long
TWAIN_SelectImageSource (Me.hWnd)
s% = TWAIN_AcquireToFilename(Me.hWnd, "c:\temp.bmp")
If s% = 0 Then
Picture1.Picture = LoadPicture("c:\temp.bmp")
Kill "c:\temp.bmp"
Else
GoTo BadScan
End If
Clipboard.Clear
If TWAIN_AcquireToClipboard(Me.hWnd, nPixTypes) = 0 Then MsgBox "No image was acquired or transfer to the clipboard failed.", vbInformation, ""
BadScan:
MsgBox "Scan has been aborted", vbInformation, ""
Question :
1. how to code the (Me.hWnd) in VFP?
2. how to call the clipboard in VFP ?
Thanks
kengwen
3. What is mean by the s% ?
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement