2

I have a very huge business application that contains almost all types of controls + third party controls. Now I have a requirement where I have to open a Form on "ctrl + double click" on any control(grid, cell, row, treenode, button, etc.. etc..)..

Is it possible in Winforms C#.Net.

I tried with this code as well but it didn't help

const int WM_LBUTTONDBLCLK = 0x0203;//client area
const int WM_NCLBUTTONDBLCLK = 0x00A3;//non-client area
protected override void WndProc(ref Message m)
{
  if (m.Msg == WM_LBUTTONDBLCLK)
    return;
  if (m.Msg == WM_NCLBUTTONDBLCLK)
    return;
  base.WndProc(ref m);
}

I am not sure if I can create a Common Context Menu at application level Thanks.

1 Answer 1

0

You will have to use keyboard and mouse hooks for that.

Here are some great articles that will get you started.

Processing Global Mouse and Keyboard Hooks in C#

And

WPF, low-level keyboard hook sample

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.