Hi i need to get all running application not process and then list it in a listview
Thank you but by the way can any one tell me how can i do an action to the selected element of a listview on buttonclick
thank you all again this will help me alot

This isn't ListView code, but it will help:

While quickly looking into this, I noticed ONE difference between running applications and running processes is that the applications have Window Titles.
There is probably some other quality, but that's the first thing I saw.

So, looping through the processes that have Window Titles will get the applications.

Consider this:

using System;
using System.Diagnostics;
using System.Linq;

namespace DW_405589_CS_CON
{
   class Program
   {
      static void Main(string[] args)
      {
         foreach (Process proc in Process.GetProcesses().Where(p => !string.IsNullOrEmpty(p.MainWindowTitle)))
         {
            Trace.WriteLine(
               string.Format("{0}({1})", proc.MainWindowTitle, proc.ProcessName));
         }
      }
   }
}

Which will show the applications in the output window.

Putting them in a listview would not be difficult.

Next, once you've narrowed down just the ones you need, you can access the methods on each of those apps (like Kill() and Start())

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.