显示正在运行的应用程序的名称 [英] Display the name of running applications

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

问题描述

大家好

任何人都可以指导我如何开发应用程序,在该应用程序中,每当单击按钮时,我们都会收到一条消息,显示在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

推荐答案

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


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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆