public static WindowInfo[] GetThreadWindowsInfoList(int threadId) { EnumWindows enumWindows = new EnumWindows(); return (from hWnd in enumWindows.GetThreadWindowsList(threadId) select GetWindowInfo(hWnd)).ToArray(); }
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()); }
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()); }
public static IntPtr[] GetThreadWindowsList(int threadId) { EnumWindows enumWindows = new EnumWindows(); return enumWindows.GetThreadWindowsList(threadId).ToArray(); }
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(); }
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(); }
public static WindowInfo[] GetThreadWindowsInfoList(int threadId) { EnumWindows enumWindows = new EnumWindows(); return((from hWnd in enumWindows.GetThreadWindowsList(threadId) select GetWindowInfo(hWnd)).ToArray()); }
public static IntPtr[] GetThreadWindowsList(int threadId) { EnumWindows enumWindows = new EnumWindows(); return(enumWindows.GetThreadWindowsList(threadId).ToArray()); }