且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

显示正在运行的应用程序的名称

更新时间:2022-06-24 03:28:42

Google是您***的朋友:例如,参见 ^ ].
:)
Google is you best friend: see, for instance How to enumerate currently executing processes in VB.NET[^].
:)


Process[] p= System.Diagnostics.Process.GetProcesses();
           for (int i = 0; i < p.Length; i++)
           {
               Console.WriteLine(p[i].ProcessName);
           }



Np



Np


以下代码显示了计算机中所有正在运行的进程
The following code shows all the running processes in the Computer
'Create New Object of System.Diagnostic.Process
Dim Processes as System.Diagnostic.Process()
'Get the Collection of all Available Processes
Processes=System.Diagnostic.Process.GetProcesses
For Each Proc In Processes
'It Shows the all the available Processes Name through MessageBox
MessageBox.Show(Proc.Name)
Next