Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Application is running
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00532587
Message ID:
00532625
Vues:
10
>I'm trying to find a way to be sure that only one instance of my foxpro application is running. So when i start the application a second time, i want to show the user a message.
>
>Ok I know there is an api call witch compares the captions of running application, but I don't whant to use that because an other application or a mail message can have the same caption.
>
>Thanks.
>
Gerben,

Three ways come to mind. One is to set up the application as a DDE Server. What you'd do is use DDEInitiate() to check for an existing instance, and if it was found, terminate the second. I believe you'll find something in the download section on this

Another way would be to use the CreateEvent API call. Ed Rauh demonstrates this technique in one of his FAQs, I believe.

Finally, you could use the CreateMutex() API call. I demonstrated this technique in the November, 1998 issue of FoxPro Advisor.
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