List taskbar child windows
Posted on 2007-03-20
I want to list all the processes that show a windows form in taskbar.
Here is my last coding:
public static List<CustomProcess> GetTaskbarWindowsList()
List<CustomProcess> list = new List<CustomProcess>();
foreach (System.Diagnostics.Process p in System.Diagnostics.Process.GetProcesses())
if (p.MainWindowTitle != string.Empty)
list.Add(new CustomProcess(p.Handle, p.MainWindowTitle,p.MainModule.FileName));
It returns the main window of a process, but if an app has several sub windows I can't get them: I only get the main window (for example, I only get main window of Outlook Express (1 result) ,but in taskbar I can see 2 other windows : inbox window, newMessage window).
How can I get those child windows ?
I try EnumChildWindows, but I get all objects in the form, not only the child window handle.
Thanks in advance for your help.