Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check the Instance of EXE File already running..?
Message
 
 
À
01/03/2002 17:32:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00626833
Message ID:
00627294
Vues:
18
Correction - it was not message from me, but a reply to me. I don't know about this technique and haven't tried it.

>I saw it from Message #622328 of Nadya Nosonovsky (USA)and It it works very well.
>
>This goes in the program that launch your application:
>
>=myInstance('smvfp.exe')
>&& maybe the first line
>
>then, place this code at the bottom of the launch application:
>*********************
>Procedure myInstance
>Parameter myApp
>=Ddesetoption("SAFETY",.F.)
>ichannel=Ddeinitiate(myApp,"ZOOM")
>if ichannel =>0
>   wait window 'Your program is already running. This will finish' timeout 5
>   Ddeterminate(ichannel)
>   quit
>endif
>=Ddesetservice(myApp,"define")
>=Ddesetservice(myApp,"execute")
>=Ddesettopic(myApp,"ddezoom")
>return
>*******
>Procedure ddezoom
>Parameter ichannel,saction,sitem,sdata,sformat,istatus
>Zoom window screen Norm
>return
>*********
>
>This code works for VFP6 and VFP7.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform