PDA

View Full Version : Quản lý Process



boy2men
07-09-2007, 11:42
Sư huynh nào biết cách khởi động và đừng 1 process bất kỳ bằng VB.net không> xin chỉ giùm. thank you.
vì dụ: process có tên "abc.exe"
Em im pọt gọi System.Diagnostics ma kho thay phuong thuc stop process,

xin chỉ ngay nếu có thể. em cần gấp

makinhdi
14-10-2007, 17:40
Public Sub KillProcess(ByVal vProcess As String)
Dim ProcessList As System.Diagnostics.Process()
ProcessList = System.Diagnostics.Process.GetProcesses()
Dim Proc As System.Diagnostics.Process
For Each Proc In ProcessList
If Proc.ProcessName = vProcess Then
Proc.Kill()
End If
Next
End Sub

violetlotous
05-11-2007, 21:00
Public Sub KillProcess(ByVal vProcess As String)
Dim ProcessList As System.Diagnostics.Process()
ProcessList = System.Diagnostics.Process.GetProcesses()
Dim Proc As System.Diagnostics.Process
For Each Proc In ProcessList
If Proc.ProcessName = vProcess Then
Proc.Kill()
End If
Next
End Sub

Ko được bạn ơi báo lỗi hoài