Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to launch a VFP EXE with a parameter
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00243671
Message ID:
00243748
Views:
19
>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?
>

You can pass a parameter to another application as a part of the command line using either an API call or the native RUN command. take a lok at my API_APPRUN for an example of how this is done using CreateProcess().

The main of the called app must have a PARAMETERS or LPARAMETERS statement to accept the command line parameter(s), and some flags that are used byu the runtime itself should be avoided.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform