Closing other win app from current app

  • Thread starter Thread starter Big D
  • Start date Start date
B

Big D

Hi all,

Is there a way to kill another application from within the current
application. I need to be able to stop an application we use in house, and
can't modify that application, so what I'd like to do is write a little app
that closes the first one when an event happens (most likely just a timer).
Is this complicated to achieve?

Thanks,

D
 
* "Big D said:
Is there a way to kill another application from within the current
application. I need to be able to stop an application we use in house, and
can't modify that application, so what I'd like to do is write a little app
that closes the first one when an event happens (most likely just a timer).
Is this complicated to achieve?

Have a look at the 'System.Diagnostics.Process' class and all of its
methods in the documentation.
 
Big D,

There is always, sending a WM_CLOSE to tell the app to shutdown nicely.
That via WIN32API SendMessage.

If that doesn't work,

Then use the process class, start that process and you can use that same
instance of the process to "KILL it"

Shane
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top