16,555
社区成员
发帖
与我相关
我的任务
分享
#Region "功能代码"
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Dim localByName As Process() = Process.GetProcessesByName("notepad") '获取进程名
' For i As Integer = 0 To UBound(localByName)
' MsgBox(localByName(i).Id) '以消息弹出PID
' MsgBox(localByName(i).MainModule.FileName) '以消息弹出程序路径
'Next
If System.Diagnostics.Process.GetProcessesByName("Game").Length > 0 Then
Me.GameZT.Text = "程序正在运行!"
'MsgBox("程序进程存在Ok!")
Else
Me.GameZT.Text = "程序未运行!"
'MsgBox("On Shit!程序进程不存在.")
End If
End Sub
#End Region