Author: SushiSeanSushiSean Date: May 4, 2007 11:07
I Have a question. I use C# to send messages for other wondows.
In my example it is windows notepad.exe
So after I found handle of this window I can send WM_CHAR event.
But I need help with other two types of events.
How can I send
1) Some system key like "F5" ?
2) some combination of them? For example Alt + V ?
This is code which use now.
[DllImport("User32.dll")]
public static extern Int32 FindWindow(String lpClassName, String
lpWindowName);
[DllImport("user32.dll", CharSet = CharSet.Auto)]
public static extern int SendMessage(int hWnd, int msg, int wParam,
int lParam);
[DllImport("user32.dll", SetLastError = true)]
public static extern IntPtr FindWindowEx(IntPtr parentHandle, IntPtr
childAfter, string className, string windowTitle);
private const int WM_KEYDOWN = 256;
|