here's a way which I reckon'd work, although it's not particularly elegant...
Get hold of a copy of Microsoft Kill.exe (comes with Windows apparantly)
Kill.exe takes one argument which can either be the process ID of the app you want to terminate or it can be a pattern, defined as:
<pattern>
The pattern can be a complete task
name or a regular expression pattern
to use as a match. Kill matches the
supplied pattern against the task names
and the window titles.
So you can give it the application name you want to terminate - I've tested it with notepad by opening notepad and typing
Kill notepad
at the command prompt and it shut it doen fine.
So, although I've not tried it, you could probably do a
Shell("Kill " & strApplicationName)
in VB and kill your application, where strApplicationName'd be your application to terminate.
What d'ya reckon? Two thumbs fresh or load of old tosh?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.