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
>
>
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement