Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
! n7/ problems
Message
De
30/06/2000 22:51:39
 
 
À
30/06/2000 11:43:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00387115
Message ID:
00387251
Vues:
17
>VFP 5.0. From within a main exe i call a second exe (VFP exe), with the command
>! N7/ second.exe, clicking on a commandbutton.
>Sometimes if i click on a main form before the second exe appearing, the second exe is showed behind the first.

You're starting a separate executable and Window that runs disjoint from the first application, and you've done nothing to coordinate the two apps or establish which will be the foreground task. There are a number of API calls related to establishing the ZOrder of various application's top-level Windows such as ShowWindow(), SetActiveWindow(), SetForegroundWindow() and the like; you'll need to experiment with them. There's no provision internal to VFP using only native VFP code to coordinate the separate processes.

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.

>Always on top does not help me.
>Some suggestion?
>Thanx
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