[DllImport("user32.dll")] public static extern int SendMessage(int hWnd,uint Msg, int wParam,int lParam);
// mouse input private const uint WM_RBUTTONDOWN = 0x0204; private const uint WM_RBUTTONUP = 0x0205;// event handlerprivate void button6_Click(object sender, EventArgs e) { int window = FindWindow(null, "Notepad"); {
private const uint WM_RBUTTONDOWN = 0x0204;
private const uint WM_RBUTTONUP = 0x0205;
// event handler
private void button6_Click(object sender, EventArgs e) { int window = FindWindow(null, "Notepad"); {
SendMessage(window, WM_RBUTTONDOWN, 0, 0); SendMessage(window, WM_RBUTTONUP, 0, 0); }}
SendMessage(window, WM_RBUTTONDOWN, 0, 0);
SendMessage(window, WM_RBUTTONUP, 0, 0); }
Thanks in advance :)