SolvedKill an application with Windows Text?

Posts 1–3 of 3 · Page 1 of 1
Kill an application with Windows Text?
Hello,
I wanna kill an application and in the same time I don't want to kill others use the same process.
As example:
I wanna kill Control Panel but it uses explorer.exe so I can't kill explorer or many other things will get closed.
i.imgur . c o m / Is1TQFL.png (Remove Spaces)
So simply, I wanna kill the application by the windows text (Control Panel) without killing the explorer.exe process.
Any ideas?
Quote Originally Posted by Biesi View Post
FindWindow functionⓘ
SendMessage functionⓘ
WM_CLOSE messageⓘ

Get the HWND of the window you want to close (what you called application) using FindWindow function, then send the WM_CLOSE message to that HWND using the SendMessage function. If you don't know how to use those WinAPI functions in VB.NET see http://www.pinvoke.net/ⓘ
That worked for me! Thanks.
Posts 1–3 of 3 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us