C# WndProc捕获移位+;鼠标左键双击

C# WndProc捕获移位+;鼠标左键双击,c#,winforms,sendkeys,C#,Winforms,Sendkeys,我试图让我的winforms应用程序响应Shift+双击鼠标左键 使用WndProc 任何建议都很好 试试这样的东西 protected override void WndProc(ref Message m) { const int WM_LBUTTONDBLCLK = 0x0203; switch (m.Msg) { case WM_LBUTTONDBLCLK: {

我试图让我的winforms应用程序响应Shift+双击鼠标左键

使用WndProc


任何建议都很好

试试这样的东西

    protected override void WndProc(ref Message m)
    {
        const int WM_LBUTTONDBLCLK = 0x0203;
        switch (m.Msg)
        {
            case WM_LBUTTONDBLCLK:
                {
                    if (Control.ModifierKeys.HasFlag(Keys.Shift))
                    { 
                        //Shift plus mouse left button double clicked
                    }
                    break;
                }
        }
        base.WndProc(ref m);
    }

你到底为什么要使用WndProc?只需实现MouseDoubleClick事件处理程序并检查Shift键的Control.Modifiers。