Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to launch a VFP EXE with a parameter
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00243671
Message ID:
00243685
Vues:
24
>I have a situation where I allow users to select multiple rows in a grid in a main application. For the records they've selected, I would like to launch a sub-application, which is independant of the main - a separate EXE. I need to launch multiple instances of the sub-app, according to the number of records they selected. Also, if the main app is shut down, the sub-apps must continue running.
>
>I don't believe that I can simply "DO sub-app.exe" in a FOR loop, because it then becomes a subordinate of the main app.
>
>So, the question is... Is there any way to pass a parameter to a VFP EXE using ShellExecute? If so, what parameter, and how/where does it get accepted?
>
Hi Matthew,

ShellExecute() has a parameter that represents the parameters passed to the executable. However, simply RUNing the executable should be enough. Simply make sure that the main of the executable has either or PARAMETER or LPARAMETER statement. I've done this with APP filenames passed to and executable from the shortcut without problem.

hth,
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform