我正在尝试发送CTRL A (在这种情况下全选到一个应用程序,但我可能会尝试它不起作用)我尝试了很多组合,但都无济于事,有什么想法吗?
IntPtr appHandle = FindWindow(null, "Document1 - Microsoft Word");
if (appHandle == IntPtr.Zero)
{
MessageBox.Show("Specified app is not running.");
return;
}
SetForegroundWindow(appHandle);
System.Threading.Thread.Sleep(500);
//SendKeys.SendWait("111");
SendKeys.SendWait("^A");
//SendKeys.SendWait("^(A)"); //ctrl a
//SendKeys.SendWait("(^A)");