public static string GetWindowName(IntPtr hwnd) { int len = Win32Funcs.GetWindowTextLength(hwnd); StringBuilder sb = new StringBuilder(len + 1); Win32Funcs.GetWindowText(hwnd, sb, sb.Capacity); return(sb.ToString()); }
public void GetTitle() { int len = Win32Funcs.GetWindowTextLength(hwnd); StringBuilder sb = new StringBuilder(len + 1); Win32Funcs.GetWindowText(hwnd, sb, sb.Capacity); title = sb.ToString(); }