我有这个代码:
public static void Next()
{
Process[] processes = Process.GetProcessesByName("test");
foreach (Process proc in processes)
PostMessage(proc.MainWindowHandle, WM_KEYDOWN, VK_RIGHT, 0);
}
此代码发送右箭头键,我想发送 ALT+CTRL+RIGHT 我试过这个:
public static void Forward()
{
Process[] processes = Process.GetProcessesByName("test");
foreach (Process proc in processes)
{
PostMessage(proc.MainWindowHandle, WM_KEYDOWN, VK_CONTROL, 0);
PostMessage(proc.MainWindowHandle, WM_KEYDOWN, VK_ALT, 0);
PostMessage(proc.MainWindowHandle, WM_KEYDOWN, VK_RIGHT, 0);
}
}
但它不起作用...
有任何想法吗?