>>If you want to run the second executable with an apparent Modal behavior relative to the first, you might experiment with using my API_APPRUN class in the Files Section; it has the ability to start a WinApp and wait on it's termination before returning to the calling VFP app, unlike run with the /N switches. You also might want to look at using The Windows Script Host's Wscript.Shell object; it can start (and wait on termination if desired) a WinApp, and can cause the activation of an app based on the primary Window's titlebar for a given application. There are links in my signature block to several WSH resource sites.
>Thanks for your reply. I've tried your api_apprun. But it does no help me, because 'lunchappandwait' just call the exe and wait. But it don't do nothing to put the called exe as the top of the screen:am i wrong?
You could force this if you're already running something that wants to be topmost - try changing the ShowWindow parameter used for the .EXE launched by API_APPRUN to 5 in the STARTUPINFO structure (minor hack to the class) or use LaunchApp(), wait for the app to go idle, and use the WSH AppActivate or Win32API call SetForegroundWindow() or SetWindowPos() API calls - both are documented in the Windows API section, and then spin on the return from CheckExitCodeProcess to see when you're done (call with a timer, or after making the app the topmost window, use WaitForSingleObject() to wait for the process to be signalled.)
>I did not find ShowWindow() SetActiveWindow and so on. Have you some code example, or can you tell me where I should search for this?
Try the Windows API section - both functions are shown with sample code.
>I just want an exe not underground!
The Win32 APIs aren't exactly a big secret...