Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Linking scanner to VFP programs
Message
 
To
19/02/2004 11:45:55
Reza Meamar
Homa Programming Group
Shiraz, Iran
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00877506
Message ID:
00878837
Views:
23
Hi Reza,

I'm sorry but right now I have no time available to look at the code below, however, just a few minutes ago I stumbled upon something that may be very useful to you (and others):

http://www.foxite.com/articles/002.htm

It's an article about Kodak imaging and VFP.

Good luck!

Alex
PS: having taken a second look at the code below, it's pretty straight-forward. You could use it as pseudo-code to write your own routine in vfp.

>Dear Alex
>I found below code.can you change it into VFP for me?
>
>
>Declare Function GetActiveWindow Lib_
> {User32} () As Long
>Declare Sub SetActiveWindow Lib {User32}_
> (Byval hwnd As Long)
>
>Sub Click(Source As Button)
>On Error Goto ErrorHandler
>Const SCANFILEPATH$={C:Tempscan.jpg}
>Const IMPORTFILETYPE$={JPEG}
>Const RTFNAME$={Body}
>Const SCANOBJNAME$={objScan}
>
>Dim ws As New NotesUIWorkspace
>Dim uidoc As NotesUIDocument
>Dim wndhnd As Long
>Dim strFile As String
>Dim strRTFName As String
>Dim objScan As Variant
>
>Set uidoc = ws.CurrentDocument
>Set objScan = uidoc.GetObject(SCANOBJNAME)
>
>wndhnd&=GetActiveWindow()
>
>If objScan.ScannerAvailable=True Then
>objScan.ShowSelectScanner
>
>objScan.Image=SCANFILEPATH
>objScan.ScanTo=2 'StoreOnly
>objScan.PageOption=6 'CreateReplace
>objScan.ShowSetupBeforeScan=True
>'ShowScanDialog
>Call objScan.ShowScanPreferences
>'ShowScanQualityDialog
>Call objScan.StartScan
>Call uidoc.GotoField(RTFNAME)
>Call uidoc.import(IMPORTFILETYPE, SCANFILEPATH)
>Call objScan.CloseScanner
>Call SetActiveWindow(wndhnd&)
>Else
>Msgbox {Error: TWAIN driver not found!}
>End If
>
>TheEnd:
>Exit Sub
>
>ErrorHandler:
>Messagebox {The following unexpected error_
>has occured: } & Trim$(Str(Err)) & {: } & _
>Error$, 0+48+0+0, {Error Message..}
>
>Resume TheEnd
>End Sub
>
>
>
>thanks
Low-carb diet not working? Try the Low-food diet instead!
Previous
Reply
Map
View

Click here to load this message in the networking platform