Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to stop open system two time ?
Message
De
04/04/2002 22:34:35
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
 
 
À
04/04/2002 20:47:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00641215
Message ID:
00641230
Vues:
16
Hs

If you leave set resource on, then
If set('resource') != "ON"
   * a VFP app is already open.
   * So end here
Endif
OR

If you use FOPEN() to open a file on app startup, you can keep it open through the whole VFP session; another instance won't be able to open the file.

These methods do require an extra file handle but only on the local machine and the code is easy to follow and maintain...

Regards

JR
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform