Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Preventing an app to be started twice
Message
De
26/11/1996 18:12:27
 
 
À
26/11/1996 16:03:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00013585
Message ID:
00013650
Vues:
39
>>Is ther anyone out ther ewho can tell me how to prevent an app from starting twice (By users). A neat way please using temp tables and so on i know but there must be a easier way.
>
>Dave is right. This has been dicussed many times. But, here the info. The best solution is to have it at the icon level so no change in your FoxPro code. The icon should call a small C exe which will detect if your application is running, if yes switch to it, if no open it. Many people on the Universal Thread are using a C program which was done by a C programmer that works well with Visual FoxPro. Do you want the contact information?

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.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform