GetWindowText() public static method

Gets the text of the specified window's title bar.
public static GetWindowText ( IntPtr windowHandle ) : string
windowHandle System.IntPtr A handle to the window containing the text.
return string
Beispiel #1
0
 /// <summary>
 /// Gets all the windows that contain the specified title.
 /// </summary>
 /// <param name="windowTitle">A part a window title string.</param>
 /// <returns>A collection of <see cref="RemoteWindow"/>.</returns>
 public IEnumerable <RemoteWindow> GetWindowsByTitleContains(string windowTitle)
 {
     return(WindowHandles
            .Where(handle => WindowCore.GetWindowText(handle).Contains(windowTitle))
            .Select(handle => new RemoteWindow(_memorySharp, handle)));
 }