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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only