4

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?

4

4 回答 4

3

你可以使用Process.GetProcesses函数

试试这个代码。

    For Each OneProcess As Process In Process.GetProcesses
        ListBox1.Items.Add(OneProcess.ProcessName)
    Next
于 2012-04-27T12:00:58.013 回答
1

不是 VB 人,但试试

Dim localAll As Process() = Process.GetProcesses()

和一些可能的进口:

Imports System
Imports System.Diagnostics
Imports System.ComponentModel

来自http://msdn.microsoft.com/en-us/library/1f3ys1f9.aspx的信息

于 2012-04-27T09:38:11.383 回答
1
Imports System.Diagnostics.
Dim p As Process
For Each p In Process.GetProcesses
 Console.WriteLine(p.ProcessName)
Next
于 2012-04-27T09:34:05.153 回答
0

您可以使用:

Process.GetProcesses()

System.Diagnostics

参考这里

于 2012-04-27T09:34:19.653 回答