Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the name of current application in C#

Tags:

c#

process

I want to get the name of current application that it's running on windows.

For example, if i work with i.e, this function give "Internet explorer" or if i work with Google chrome, give Chrome...

like image 764
a d Avatar asked Dec 26 '22 05:12

a d


1 Answers

System.AppDomain.CurrentDomain.FriendlyName

or maybe

System.Reflection.Assembly.GetExecutingAssembly()

or if you mean that you want the name of the active window then you should look at;

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

like image 153
madbrendon Avatar answered Jan 06 '23 21:01

madbrendon