Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check if a form is running
Message
De
12/12/2014 13:56:31
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Check if a form is running
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01612214
Message ID:
01612214
Vues:
58
Hi all:

How do I check to see if a form is already running on THIS machine? In the example below the 'showform' property of the form is set to 2 - as top-level form.

In other words, I don't care if it is running on some other machine, but if it is running on THIS machine, I do not want a second instance. In that case, I want to kill the old instance before executing this instance.

BTW, how do check if it is running on ANY machine?

Thanks,

Yossi
If form 'spform' is already running
    display message asking to kill the old instance
    if Yes
        kill the old instance
    else
        get out
    endif
endif

DO FORM sp NAME spform     &&showform = 2-as top-level form
READ EVENTS
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform