本文介绍了显示正在运行的应用程序的名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

任何人都可以指导我如何开发应用程序,在该应用程序中,每当单击按钮时,我们都会收到一条消息,显示在Windows上正在运行的应用程序的名称.


例如-我在Windows中有正在运行的Microsoft Word文档,Visual Studio,gtalk,然后消息框显示这些应用程序正在运行.


谢谢

hi all

can anybody guide me how to develop an application in which whenever we click the button, we get the message that display the name of running applications on windows.


for example- i have active running microsoft word document, visual studio, gtalk in my windows then the message box shows that these applications are running.


Thanks

推荐答案


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



Np



Np


'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


这篇关于显示正在运行的应用程序的名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 01:06