Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to close programs from the task bar in windows nt an
Message
De
04/09/2001 12:30:53
 
Information générale
Forum:
Visual Basic
Catégorie:
Fonctions API de Windows
Divers
Thread ID:
00548825
Message ID:
00552128
Vues:
16
>What i'm trying to do is a program that updates files automaticaly, and i need to know if the list of files that i'm going to update are currently running, if they are running then i have to close them and then do the update.
>
>About the GetObject() function, i didn't understand it, is there an example a little bit more simple?.
>
>Thanks.

If you can open a program with CreateOject() or New, as in Set oXL=New Excel.Application, then you can get a reference to the running instance with oXL = GetObject(,"Excel.Application").

But, if you already know what to look for you don't need to enumerate every running program, just specify the window names to the function in MSKB Q176391 (link on my first reply) to close them if they are running.

If the call to FindWindow API fails, (the app is not running) it will return Null.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform