Click here to Skip to main content
14,932,238 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I was trying to make a simple version of windows task manager. I want to list working applications in my program. Not all of them, only programs listing on taskbar.

Try to eliminate with IsWindowVisible or IsIconic. But this code listing like TextInputHost, ApplicationFrameHost etc. But I only want to see like task manager not detailed one. I need good ideas and if anyone help me I would be glad.

My Task Manager showing that programs:
But I want to list that ones:

What I have tried:

        [return: MarshalAs(UnmanagedType.Bool)]
        static extern bool IsWindowVisible(IntPtr hWnd);
        public static extern bool IsIconic(IntPtr hWnd);

Process[] processes = Process.GetProcesses();
foreach (var proc in Process.GetProcesses())
if (proc.MainWindowHandle != IntPtr.Zero && proc.MainWindowTitle != "")
Updated 5-May-21 7:17am
OriginalGriff 5-May-21 11:54am
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with.
Use the "Improve question" widget to edit your question and provide better information.
Member 10660489 5-May-21 12:47pm
Actually this is a simple question if you try to list working applications on your computer. But there is a problem I want to eliminate hidden ones or unnecessary ones. I added some more informations.

1 solution

Maciej Los 5-May-21 15:37pm
BillWoodruff 6-May-21 1:04am
Member 10660489 6-May-21 3:55am
I checked it but that one explaining how to list all details of working process of windows. I need simple one.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900