Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checking for single instance of a VFP exe
Message
De
23/05/1999 09:13:50
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00220668
Message ID:
00221881
Vues:
14
>Thanks to you, Evan and James for the help. But I'm still pretty new to all this stuff, so maybe a little more direction would help.

Basically what the code does is to set a windows MUTEX (an object that can be owned by a single thread at any one time) and then adds a property to the window object of the application (so that we would be able to identify it later)
if the mutex creation failed - it means another thread (i.e. another instance of the application) had already created one so the application searches for the window that has the property (the one we defined earlier) and switches to it
The advantage of adding a poperty to the window is that you don't depend on the title of the application which can change esp. in document oriented applicatins

Arnon
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform