Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to pass parameter to a program via Shellexecute?
Message
De
27/07/2005 14:07:38
 
 
À
27/07/2005 13:59:56
Mike Sue-Ping
Cambridge, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01036354
Message ID:
01036356
Vues:
16
>Hi,
>
>I'm trying to use Shellexecute that comes in the VFP foundation classes. I need to run a program that itself accepts parameters but there doesn't appear to be anyway to pass the latter as a parameter to the shellexecute class. Upon digging into the class code, I noticed that an empty string is always sent as the parameter.
>
>Anyone know why this was done and if there is a way around it so that I can send my parameters to the program that I want to Shellexecute to?
>
>TIA
>
>Mike



You can call it directly (I never used the provided class)
DECLARE INTEGER ShellExecute IN shell32; 
    INTEGER hwnd,; 
    STRING  lpOperation,; 
    STRING  lpFile,; 
    STRING  lpParameters,;   
    STRING  lpDirectory,; 
    INTEGER nShowCmd

* opens Notepad with a parameter: "file1.txt"
ShellExecute(0,"open","notepad.exe","file1.txt","c:\temp",1)


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform