Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to close programs from the task bar in windows nt an
Message
From
04/09/2001 12:30:53
 
General information
Forum:
Visual Basic
Category:
Windows API functions
Miscellaneous
Thread ID:
00548825
Message ID:
00552128
Views:
27
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform