Exemplo n.º 1
1
 public static WindowInfo[] GetThreadWindowsInfoList(int threadId)
 {
     EnumWindows enumWindows = new EnumWindows();
     return (from hWnd in enumWindows.GetThreadWindowsList(threadId) select GetWindowInfo(hWnd)).ToArray();
 }
Exemplo n.º 2
0
        public static WindowInfo[] GetProcessWindowsInfoList(Process process, bool mainWindow)
        {
            List <IntPtr> windowsList = new List <IntPtr>();
            EnumWindows   enumWindows = new EnumWindows();

            foreach (ProcessThread thread in process.Threads)
            {
                if (mainWindow)
                {
                    windowsList.AddRange(from hWnd in enumWindows.GetThreadWindowsList(thread.Id) where User.GetParent(hWnd) == IntPtr.Zero select hWnd);
                }
                else
                {
                    windowsList.AddRange(enumWindows.GetThreadWindowsList(thread.Id));
                }
            }
            return((from hWnd in windowsList select GetWindowInfo(hWnd)).ToArray());
        }
Exemplo n.º 3
0
        public static WindowInfo[] GetProcessWindowsInfoListByClassName(Process process, string className)
        {
            List <IntPtr> windowsList = new List <IntPtr>();
            EnumWindows   enumWindows = new EnumWindows();

            foreach (ProcessThread thread in process.Threads)
            {
                windowsList.AddRange(from hWnd in enumWindows.GetThreadWindowsList(thread.Id) where GetWindowClassName(hWnd) == className select hWnd);
            }
            return((from hWnd in windowsList select GetWindowInfo(hWnd)).ToArray());
        }
Exemplo n.º 4
0
 public static IntPtr[] GetThreadWindowsList(int threadId)
 {
     EnumWindows enumWindows = new EnumWindows();
     return enumWindows.GetThreadWindowsList(threadId).ToArray();
 }
Exemplo n.º 5
0
 public static WindowInfo[] GetProcessWindowsInfoListByClassName(Process process, string className)
 {
     List<IntPtr> windowsList = new List<IntPtr>();
     EnumWindows enumWindows = new EnumWindows();
     foreach (ProcessThread thread in process.Threads)
         windowsList.AddRange(from hWnd in enumWindows.GetThreadWindowsList(thread.Id) where GetWindowClassName(hWnd) == className select hWnd);
     return (from hWnd in windowsList select GetWindowInfo(hWnd)).ToArray();
 }
Exemplo n.º 6
0
 public static WindowInfo[] GetProcessWindowsInfoList(Process process, bool mainWindow)
 {
     List<IntPtr> windowsList = new List<IntPtr>();
     EnumWindows enumWindows = new EnumWindows();
     foreach (ProcessThread thread in process.Threads)
     {
         if (mainWindow)
             windowsList.AddRange(from hWnd in enumWindows.GetThreadWindowsList(thread.Id) where User.GetParent(hWnd) == IntPtr.Zero select hWnd);
         else
             windowsList.AddRange(enumWindows.GetThreadWindowsList(thread.Id));
     }
     return (from hWnd in windowsList select GetWindowInfo(hWnd)).ToArray();
 }
Exemplo n.º 7
0
        public static WindowInfo[] GetThreadWindowsInfoList(int threadId)
        {
            EnumWindows enumWindows = new EnumWindows();

            return((from hWnd in enumWindows.GetThreadWindowsList(threadId) select GetWindowInfo(hWnd)).ToArray());
        }
Exemplo n.º 8
0
        public static IntPtr[] GetThreadWindowsList(int threadId)
        {
            EnumWindows enumWindows = new EnumWindows();

            return(enumWindows.GetThreadWindowsList(threadId).ToArray());
        }