Exemplo n.º 1
0
 public static IntPtr FindWindowByTitle(string windowTitle)
 {
     foreach (var hwnd in WindowHelper.EnumAllWindows())
     {
         if (WindowHelper.GetWindowText(hwnd).Equals(windowTitle, StringComparison.Ordinal))
         {
             return(hwnd);
         }
     }
     return(IntPtr.Zero);
 }
Exemplo n.º 2
0
 public IEnumerable <RemoteWindow> GetWindowsByTitleContains(string windowTitle)
 {
     return(WindowHandles
            .Where(handle => WindowHelper.GetWindowText(handle).Contains(windowTitle))
            .Select(handle => new RemoteWindow(m_Process, handle)));
 }
Exemplo n.º 3
0
 public IEnumerable <RemoteWindow> GetWindowsByTitle(string windowTitle)
 {
     return(WindowHandles
            .Where(handle => WindowHelper.GetWindowText(handle).Equals(windowTitle, StringComparison.Ordinal))
            .Select(handle => new RemoteWindow(m_Process, handle)));
 }