I need to be able to list all active applications on a windows machine. I had been using this code:
Process[] procs = Process.GetProcesses("."); foreach (Process proc in procs) { if (proc.MainWindowTitle.Length > 0) { toolStripComboBox_StartSharingProcessWindow.Items.Add(proc.MainWindowTitle); } } Until, I realized that this doesn't list cases like WORD or ACROREAD when multiple files are opened each in their own window. In that situation, only the topmost window is listed using the above technique. I assume that's because there's only one process even though two (or more) files are opened. So, I guess my question is: How do I list all windows rather than their underlying process?