以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  怎样杀掉进程?  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=118277)

--  作者:54292550
--  发布时间:2018/4/27 20:49:00
--  怎样杀掉进程?
比如我有一个1.exe的进程程序在运行,想通过foxtable软件判断一下是否在运行,如果在运行就关闭掉这个进程。
--  作者:有点蓝
--  发布时间:2018/4/27 20:58:00
--  
Dim ps As  System.Diagnostics.Process() = System.Diagnostics.Process.GetProcessesByName("1")
For Each p As System.Diagnostics.Process In ps
    \'If p.MainWindowTitle.Contains("管理项目1") Then
        p.kill
    \'End If
Next