M
M
Max Maximov2014-10-01 05:38:29
.NET
Max Maximov, 2014-10-01 05:38:29

How to close an application opened through a C#/WPF program?

Hello.
I am interested in the following functionality: I need to launch another application through my WPF / WinForms application (say, chrome or Warcraft) and close it after a certain time - how can this be implemented (libraries, tutorials or just tips where to dig)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
AlexP11223, 2014-10-01
@AlexP11223

Process.Start and Process.Kill (or Close, CloseMainWindow)?
Well, or for a specific application, simulate the necessary actions to close it, such as sending a WM_CLOSE message to the window, pressing a button (BM_CLICK for example), etc.

A
Anton Fedoryan, 2014-10-01
@AnnTHony

Try this or this .
Dig towards this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question