private static void InjectRightMouseClick(IntPtr child, NPoint clientLocation)
        {
            IntPtr lParamClickLocation = MessagingMethods.MakeLParam(clientLocation.X, clientLocation.Y);

            MessagingMethods.PostMessage(child, WM.RBUTTONDOWN, new IntPtr(MK.RBUTTON), lParamClickLocation);
            MessagingMethods.PostMessage(child, WM.RBUTTONUP, new IntPtr(MK.RBUTTON), lParamClickLocation);

            #if DEBUG
            Console.WriteLine("Right click on window #" + child.ToString() + " at " + clientLocation.ToString());
            #endif
        }
Exemple #2
0
        private static void InjectDoubleRightMouseClick(IntPtr child, NPoint clientLocation)
        {
            IntPtr lParamClickLocation = MessagingMethods.MakeLParam(clientLocation.X, clientLocation.Y);

            MessagingMethods.PostMessage(child, WM.RBUTTONDBLCLK, new IntPtr(MK.RBUTTON), lParamClickLocation);

            #if DEBUG
            System.Diagnostics.Debug.WriteLine("Double right click on window #" + child.ToString() + " at " + clientLocation.ToString());
            #endif
        }