如何从另一个程序的文本框中读取值
我用的WIN32的API 如下:
IntPtr xx = FindWindow("WindowsForms10.Window.8.app.0.b7ab7b", "Form1");
if (xx != IntPtr.Zero)
{
byte[] buByte = new byte[1024];
int count = 0;
IntPtr cxx = FindWindowEx(xx, IntPtr.Zero, "WindowsForms10.EDIT.app.0.b7ab7b", null);
count = GetWindowText(cxx, buByte, 1024);
MessageBox.Show(Encoding.UTF8.GetString(buByte));
}
可以找到我自己做的程序的文本框值,但是别人的却找不到
是不是 GetWindowText 这个方法错了呢?