nbsp; ListBox3.Items.Clear()
TabPage1.Text = "进程" & ListBox1.Items.Item(zj) & "的基本信息"
TabPage2.Text = "进程" & ListBox1.Items.Item(zj) & "相关的线程信息"
TabPage3.Text = "进程" & ListBox1.Items.Item(zj) & "相关的模块信息"
''/////////////////////////////////////////////
f = myProcesses(zj).Threads.Count
Label4.Text = "进程" & ListBox1.Items.Item(zj) & "共有" & f & "个相关的线程,线程ID信息如下:"
Dim int, pk, m, n
For n = 0 To f - 1
ListBox3.Items.Add(myProcesses(zj).Threads(n).Id)
Next
''///////////////////////////////////////
ListBox5.Items.Clear()
Dim zha, kl
zha = myProcesses(zj).Modules.Count
Label5.Text = "与进程" & ListBox1.Items.Item(zj) & "共有" & zha & "个相关的模块,模块位置信息如下:"
For kl = 0 To zha - 1
ListBox5.Items.Add(myProcesses(zj).Modules(kl).FileName)
Next
End Sub
Private Sub ListBox3_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox3.DoubleClick
ListBox4.Items.Clear()
Dim f, n
f = myProcesses(zj).Threads.Count
n = ListBox3.SelectedIndex
Label6.Text = "线程" & ListBox3.Items.Item(n) & "相关信息"
With ListBox4.Items‘与进程相关的线程信息见System.Diagnostics.processThread类。因为Processes.threads属性是返回thread对象数组而thread对象数组的实例是由ProcessThread类来创建,thread对象数组的信息是包含在System.Diagnostics. ProcessThread类中。
.Add(myProcesses(zj).Threads(n).BasePriority)
.Add(myProcesses(zj).Threads(n).CurrentPriority)
.Add(myProcesses(zj).Threads(n).PriorityLevel)
.Add(myProcesses(zj).Threads(n).PrivilegedProcessorTime)
.Add(myProcesses(zj).Threads(n).StartTime)
.Add(myProcesses(zj).Threads(n).ThreadState.ToString)
.Add(myProcesses(zj).Threads(n).TotalProcessorTime.Seconds)
.Add(myProcesses(zj).Threads(n).UserProcessorTime.Seconds)
.Add(myProcesses(zj).Threads(n).WaitReason.ToString)
End With
End Sub
Private Sub ListBox5_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox5.DoubleClick
ListBox6.Items.Clear()
Dim f, n, m
f = myProcesses(zj).Modules.Count
n = ListBox5.SelectedIndex
Label7.Text = "模块" & ListBox5.Items.Item(n) & "相关信息"
With ListBox6.Items‘与进程相关的模块信息见System.Diagnostics. ProcessModule类,因为Processes.Modules属性是返回Modules对象数组而Modules对象数组的实例是由ProcessModule类来创建,Modules对象数组的信息是包含在System.Diagnostics. ProcessModule类中。
m = Hex(myProcesses(zj).Modules(n).BaseAddress.ToInt32)‘转换成16进制
.Add(m)
m = H