Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check for running instance
Message
From
31/07/1997 13:15:44
 
 
To
30/07/1997 17:47:33
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00018581
Message ID:
00042641
Views:
49
this(and other VFP based solutions) are not as good as a C++ program that will do that , for a simple reason - speed, it takes more time to load all the VFP libraries and any VFP based solutin will only take effect then. while a compact C++ prgram will fire instantly Arnon >How about the following: >Use DDE/ >=DDESetOption('SAFETY',.F.) >lnChannel=DDEInitiate('YourApplicationControlName','SYSTEM') >if lnChannel<>-1 > =messagebox('Only One Copy Of YourApplicationControlName May Run On This >System At A Time',16,YourApplicationControlName') > quit >endif >=DDESetService('YourApplicationControlName','DEFINE') > > PUBLIC goApp > goApp = CREATEOBJECT(APPCLASS) > IF TYPE('goApp') = "O" > RELEASE gcOldTalk, gcOldDir, gcOldPath, gcOldClassLib, gcOldProcedure > goApp.Do() && there is our DO method mentioned in another thread > ENDIF > >*-- Free DDE Lock Name >=DDESetService('YourApplicationControlName','RELEASE') > >Got this idea from a FoxAdvisor note I believe. >You should also add teh RELEASE to any cleanup/destory/on shutdown etc. >since the service name will exist until you reboot. This should also work >in NT >HTH Gary > >
Previous
Reply
Map
View

Click here to load this message in the networking platform