Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }