Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Just one at a time
Message
De
06/08/1998 09:01:35
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
05/08/1998 14:28:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00124111
Message ID:
00124430
Vues:
26
>>>Hi all,
>>>How can avoid run two or more instances of an application in the same station...
>>>
>>>Thanks.
>>
>>Hi William,
>>
>>Vlad Tatavu has a class available in the download section that will allow you to setup a program that can only be run once. That's one way. Or you can download my Is_Run32 program and use that to check for another existence of an application. This method is similar to the way the MS KB article approaches it. Or (if you can wait until next month) you can read my article "Creating Single Instance Applications" in the October issue of FoxPro Advisor. This uses another method, namely, the one recommended by the Win32 SDK.
>>
>>hth.
>.....I almost forget, I'm trying to implement this feature (one at a timee) on Fox Pro Windows 2.6.

In that case, the old indian trick goes like this:

in config.fpw
resource=off

In start prg:
set reso off
NoGo=.f.
on error NoGo=.t.
use (set("resource",1) again excl
use
if NoGo
quit
endif
set resource on

Only make sure every instance of your app should attempt to open the same resource file; the easiest way is to have a foxuser.dbf on the local disk, and have a
resource=c:\MyPath\foxuser.dbf
in your app's config.fpw. It's a bit hard to provide the same directory and disk for every workstation (if this is a single-machine app, skip this), but it's manageable.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform