Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use/activate a pdf file within a Vfp application
Message
From
29/09/2003 10:07:52
Van Son Nguyen
Dessau Soprin Inc.
Laval, Quebec, Canada
 
 
To
28/09/2003 21:31:18
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00833041
Message ID:
00833124
Views:
30
Hi Hilmar,

I just execute the code you suggested and I got an error "Invalid association or URL."

Can you tell me I what I did wrong in the following codes:

Myfile = "c:\toto.pdf"
Rundoc(Myfile)


and in the procedures storages:

*****************************************************************
FUNCTION RUNDOC(tcDocument)

LOCAL lnResult
DECLARE Integer ShellExecute ;
IN Shell32.dll ;
integer nWinHandle,;
String cOperation,;
String cFilename,;
String cPArameters,;
String cDirectory,;
Integer nShowWindow
** Retrieve the main VFP WIndow handle
** this handle is use by ShellExecute

DECLARE Integer FindWindow IN WIN32API String cNull,String cWinName

lnResult = ShellExecute(Findwindow(0,_Screen.Caption),"Open",tcDocument,"","c:\temp\",1)

**Error messages if the return value is < 32
IF lnResult < 32
DO CASE
CASE lnResult=2
Wait wind "Invalid association or URL."
CASE lnResult=31
Wait wind "No association."
CASE lnResult=29
Wait wind "Can't start application."
CASE lnResult=30
Wait wind "Application already open."
ENDCASE
ENDIF
ENDFUNC
***********************************************************

Thank for your help,

VSN
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform