Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use/activate a pdf file within a Vfp application
Message
De
29/09/2003 10:07:52
Van Son Nguyen
Dessau Soprin Inc.
Laval, Québec, Canada
 
 
À
28/09/2003 21:31:18
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00833041
Message ID:
00833124
Vues:
32
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform