[DllImport("user32.dll", SetLastError=true, CharSet=CharSet.Auto)]
static extern int GetWindowText(IntPtr hWnd, [Out] StringBuilder lpString, int nMaxCount);
None.
None.
Please add some!
public string GetText(IntPtr hWnd)
{
// Allocate correct string length first
int length = GetWindowTextLength(hWnd);
StringBuilder sb = new StringBuilder(length);
GetWindowText(hWnd, sb, sb.Capacity);
return sb.ToString();
}
Do you know one? Please contribute it!