>Hello Ed,
>
>I downloaded and would like to use your api_apprun class. But I am not smart enough to figure out how to set the properties and what method to call to run a windows app and wait for completion. Can you help please? TIA.
API_APPRUN has 3 major properties, icCommandLine, the command line to execute, icLaunchDir, specifying the directory that you want to execute the command from, and icWindowMode, specifying the DOS Window mode for the app to run in. You can specify these in the Init of the object, or set them subsequently. You then invoke the LaunchAppAndWait method to start the app and wait for it to complete, or LaunchApp to start the app and return control to VFP immediately. If you use LaunchApp, you can check the status of the running process with the CheckProcessExitCode method.
If not set, icLaunchDir defaults to the VFP current working directory.
If not set, icWindowMode defaults to the normal mode (other possible values would be MAX, MIN, NOR and HID for maximized, minimized, normal and hidden from the Windows desktop respectively.)
icCommandLine must be set.
The detailed functionality is documented in the comments at the beginning of the Init method of the class.