Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Starting application
Message
 
À
03/10/2000 15:56:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00424335
Message ID:
00424344
Vues:
27
>Is there a way to prevent starting a second time the same application (.exe) ?
>
>thank you

Jacques,

There are a number of ways to do this:

1. Set up the application as a DDE server, and try to access it on start up. If you can, it's running. If it times out, it isn't. Vlad Tatavu has a file here that uses this method. Unfortunately, I don't know exact location and file number.
2. Iterate through the existing top-level windows looking for the title bar. My Is_Run32 (Is a Windows Application Running?) does this. It's in the download section in Win32 and Other APIs.
3. Create a mutex. I described this technique in the Nov. 1998 issue of FoxPro Advisor. The article is on-line at www.advisor.com
4. Create an event. Ed Rauh uses this technique. It's FILE#9807, in the Win32 and Other APIs section (number 33 or 34 or the list).
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform