Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Preventing an app to be started twice
Message
De
27/11/1996 09:29:49
 
 
À
26/11/1996 18:14:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00013585
Message ID:
00013695
Vues:
42
>>C propgram is fine but the quickest way it's may be API call:
>> DECLARE INTEGER FindWindow in win32api INTEGER,STRING
>> if FindWindow(0,oSystem.Apptitle)<>0
>> QUIT
>> endif
>>Put this code to first lines of your App but after oSystem app object created.
>
>No, this is certainly not the quickest way because you have to load another instance of Visual FoxPro in memory before executing the first line of your code. And, in most case, you'll run out of memory before it succeed loading another time.
>
>What can be faster than clicking on the icon and having an instant switch to the application that was already running? :)

Surely, you right. I meant the quickest way from VFP programmer standpoint (you don't need to go outside VFP). By the way I'm not sure about running out of memory. Actually I have system with couple VFP/VB executables running concurrently and memory is OK even on low-end (16M) workstations.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform