Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
! n7/ problems
Message
De
30/09/2000 19:49:32
 
 
À
27/09/2000 13:25:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00387115
Message ID:
00423181
Vues:
25
>>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...
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform