Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to stop open system two time ?
Message
From
04/04/2002 22:34:35
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
 
 
To
04/04/2002 20:47:00
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00641215
Message ID:
00641230
Views:
15
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform