I know you can get a list of the current processes that are running by using Process[] processes = Process.GetProcesses();
or Process[] processes = Proces
Get the list of processes, then filter by those processes that have a MainWindowHandle.
A process has a main window associated with it only if the process has a graphical interface. If the associated process does not have a main window, the MainWindowHandle value is zero. The value is also zero for processes that have been hidden, that is, processes that are not visible in the taskbar. This can be the case for processes that appear as icons in the notification area, at the far right of the taskbar.
If it has a main window, it's an "application" as far as the Task Manager is concerned.
var processes = Process.GetProcesses()
.Where(p=> p.MainWindowHandle != 0)
.ToArray();
Amy's answer is the one, but I had to change it to
var running_apps = Process.GetProcesses()
.Where(p => (long)p.MainWindowHandle != 0)
.ToArray();