Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Open and Print a PDF file
Message
De
13/12/2005 16:28:33
Bill Gravell
Indoor Purification System
Menifee, Californie, États-Unis
 
 
À
25/04/2005 14:49:39
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00773960
Message ID:
01077653
Vues:
26
Ken,

I found this thread because I need to be able to display a PDF from within my VFP9 app. I am getting a rather strange error. I have a button on a form that contains the code:

oShellExecute=NEWOBJECT("_ShellExecute",HOME()+"FFC\_Environ.vcx")
oShellExecute.shellexecute("c:\eqinvmanual\ver1\ver1manual.pdf")

If I run the form outside my app, it runs just fine, but when I try to run it from within my app, I get the message "The procedure entry point UninitalizeCriticalSection could not be located in the dynamic link library KERNEL32.dll". If I click OK, the entire app bombs...

I've tried some of the other examples, but none of them seem to work at all.

Can you give me some idea of how to resolve this issue?

Thanks,

Bill Gravell

>>>I need to Open and Print a PDF file from VFP. Someone can help me?
>>
>>You can use ShellExecute API #12636.
DECLARE INTEGER ShellExecute IN "Shell32.dll" ;
>>    INTEGER hwnd, ;
>>    STRING lpVerb, ;
>>    STRING lpFile, ;
>>    STRING lpParameters, ;
>>    STRING lpDirectory, ;
>>    LONG nShowCmd
>>
>>lcPDFfile = "c:\mydir\myfile.pdf"
>>* Open PDF file
>>=Shellexecute(0,"Open", lcPDFfile, "","",7)
>>* Print PDF file
>>=Shellexecute(0,"Print", lcPDFfile, "","",0)
>>
>
>An easier way to do this without having to code the DECLARE and all is simply use the FFC class that does this for you (which I wrote for inclusion in VFP7):
>
>oShellExecute=NEWOBJECT("_ShellExecute",HOME()+"FFC\_Environ.vcx")
>oShellExecute.shellexecute("c:\mydir\myfile.pdf")
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform