C# find process

“Use Enumwindows and GetWindowText to find the handle of the window that has the caption you are looking for. Then use GetWindowThreadProcessId to get the ID of the process that owns the window. Finally use Process.GetProcessById to get the properties of the process.”

After these steps, you can call Process.Kill to close the corresponding process.

For additional information, please see this popular thread:
http://social.microsoft.com/Forums/en-US/netfxbcl/thread/45e2bbce-77bd-487f-b0f8-13150fcf680e

posted @ 2009-05-20 09:37  南守拥  阅读(317)  评论(0编辑  收藏  举报