byte[] buffer = new byte[255];

解决方案 »

  1.   

    jiezhi(風依舊) :
    我是想用 GetWindowText
    不知道该怎么套,您能给个代码吗?
      

  2.   

    public class Win32API {
    [DllImport("User32.Dll")]
    public static extern void GetWindowText(int h, StringBuilder s, 
    int nMaxCount);
    }
    public class Window {
       internal int h;        // Internal handle to Window.
       public String GetText() {
          StringBuilder sb = new StringBuilder(256);
          Win32API.GetWindowText(h, sb, sb.Capacity + 1);
       return sb.ToString();
       }
    }