I have this code:
public static void Next()
{
Process[] processes = Process.GetProcessesByName("test");
foreach (Process proc in processes)
PostMessage(proc.MainWindowHandle, WM_KEYDOWN, VK_RIGHT, 0);
}
This code sents the Right Arrow key, i want to sent ALT+CTRL+RIGHT i tried this:
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);
}
}
But it doesn't work...
Any ideas?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…