In my program, i need to List up all processes that currently running on windows by VB.NET framework 2.0.
Can i get this list with VB.NET coding?
In my program, i need to List up all processes that currently running on windows by VB.NET framework 2.0.
Can i get this list with VB.NET coding?
你可以使用Process.GetProcesses
函数
试试这个代码。
For Each OneProcess As Process In Process.GetProcesses
ListBox1.Items.Add(OneProcess.ProcessName)
Next
不是 VB 人,但试试
Dim localAll As Process() = Process.GetProcesses()
和一些可能的进口:
Imports System
Imports System.Diagnostics
Imports System.ComponentModel
Imports System.Diagnostics.
Dim p As Process
For Each p In Process.GetProcesses
Console.WriteLine(p.ProcessName)
Next