以下是引用wopois在2007-7-24 14:21:29的发言:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Me.ListView1.Items.Clear()
Dim myprecess As Process() = Process.GetProcesses
Dim thisprocess As Process
For Each thisprocess In myprecess
Dim mylistviewitem As New ListViewItem
Try
mylistviewitem.Text = thisprocess.ProcessName
mylistviewitem.SubItems.Add(thisprocess.Modules(0).FileName)
mylistviewitem.SubItems.Add(thisprocess.WorkingSet64)
mylistviewitem.SubItems.Add(thisprocess.PriorityClass)
ListView1.Items.Add(mylistviewitem)
Catch ex As Exception
End Try
Next
End Sub
你这段代码是不是有问题,你要实现什么功能?我运行的时候怎么一直出现异常。