private static bool EnumWindowsProc(IntPtr hWnd, int lParam) { string strTitle = GetWindowText(hWnd); if (strTitle != "" & IsWindowVisible(hWnd)) // { string path = Process.GetProcessById(NativeWin32.GetWindowProcessId(hWnd.ToInt32())).MainModule.FileName; lstTitles.Add(path); } return(true); }
private static bool GetExplorerWindows(IntPtr hWnd, int lParam) { string strTitle = GetWindowText(hWnd); if (strTitle != "" & IsWindowVisible(hWnd)) // { string path = Process.GetProcessById(NativeWin32.GetWindowProcessId(hWnd.ToInt32())).MainModule.FileName; if (path.ToLower().Contains("explorer.exe")) { explrPointers.Add(hWnd); } } return(true); }