Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Modal ShellExecute()
Message
De
30/07/1999 21:28:32
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00248437
Message ID:
00248474
Vues:
70
>>I am usint the ShellExecute() function from the Win32 API. I followed David Frankenbach's excelent example and wrapper class. My problem is that I call the function to create a "pdf" file and then load that "pdf" into Acrobat for eMail. What is happening is that the program I use to create the "pdf" cannot create the file as Acrobat gains control of it before it can be created. In schematic format the code looks like this:
>>
>>ShellExecute creatorpgm source destination.pdf
>>small code
>>small code
>>small code
>>ShellExecute destination.pdf - this calls the associated Acrobat
>>
>>The ShellExecute function is not fininshing the first instanc before starting the second thus causing the conflict.
>>
>>Can anyone give me a suggestion on how to get the thing to work sequentially.
>>
>>Thanks in advance
>>Terry
>
>Have you looked at Ed Rauh's APIRUN in the file's section?

Ok I tried it out and it worked but not the way I was expecting. API_APPRUN works on EXE files with parameters. To open a file and its associated EXE the ShellExecute works better. For example:

oX = CREATEOBJECT('API_APPRUN', 'XXX.pdf',,'NOR)
ox.LaunchAppAndWait()

does nothing

The same thing using a ShellExecute while it doesn't wait does bring up Acrobat with XXX.pdf open in it.

Between the two functions I am able to accomplish what I need.

Thanks so much
Terry
It is impossible to make programs idiot proof. Idiots are too cleaver.

MCP( Tcp/Ip )
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform