Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to check if an EXE is still running
Message
 
À
24/04/2001 06:36:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00498906
Message ID:
00498942
Vues:
11
>Hi Folks,
>
>I am running a Fox 2.6 exe from within VFP 6.0. When the user selects the 2.6 exe to run, I use the WinExec API to kick it off. Since I do not want the user to be able to use the VFP exe, I then go into a loop checking to see if the 2.6 exe is still running using Findwindow.
>
>This all works fine except that 2.6 exe changes the screen title in some places.
>I really want to avoid using Findwindow to check for all possible screen titles.
>
>I was thinking that once I have the window handle using the 1st call to Findwindow, there must be a way to check if an exe is running using this handle - I have searched the API's but had no luck...
>
>Any help would be appreciated.
>
>Regards
>
>Cal


What you can try then is the following
When the 2.6 app is started, and you found it using the findwindow function you get the hWnd back.
You can hold that hWnd handle.
Now in your loop you don't check with FindWindow, but with the IsWindow Function.
That functions needs a hWnd and gives you back if the window exists or not.

HTH
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform