[System.Runtime.InteropServices.DllImport("user32.dll")] static extern int PostMessageA(IntPtr h, int msg, int wp, int lp); void 文本_投递(IntPtr h,string str) { byte[] b = Encoding.GetEncoding("gb2312").GetBytes(str); for (int i = 0; i < b.Length; i++) { PostMessageA(h, 258, b[i], 0); } }