c# - C#中如何获取当前应用程序的名称

标签 c# process

我想获取当前在 Windows 上运行的应用程序的名称。

例如,如果我使用 i.e,此函数提供“Internet Explorer”,或者如果我使用 Google Chrome,则提供 Chrome...

最佳答案

System.AppDomain.CurrentDomain.FriendlyName

或者也许

System.Reflection.Assembly.GetExecutingAssembly()

或者如果您的意思是您想要事件窗口的名称,那么您应该查看;

How do I get the title of the current active window using c#?

关于c# - C#中如何获取当前应用程序的名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16050235/

相关文章:

c - 如何使用linux地址空间切换来运行新进程?

c# - BinaryWriter 不写入文件

c# - 将字节数组与掩码进行比较

c - 线程创建和子进程创建的系统调用有什么区别

c - 将进程置于前台

c - 一台电脑有多少处理能力

c# - 使用 asp.net web 表单在值设置为空时验证下拉列表

c# - 异常 : Maximum number of items that can be serialized or deserialized in an object graph is '65536'

c# - 使用列表集合的 find 方法

c# - ProcessStartInfo.UseShellExecute 有什么大不了的?