MouseClick

Oct 19 2010 9:26 AM
Hi,

My goal is: when I click mouse on some control and hold CTRL button I'll get form that gives me possibility to change user right to this control. On a single button it looks like:

if (Control.ModifierKeys == Keys.Control && Keys.Control == Keys.Control)
            {
                frmUsersGroups frmUsersGroups = new frmUsersGroups(this.Name, sender.ToString());
                frmUsersGroups.ShowDialog();
            }
            else
            {//open some form}

Bu I don't want to place this code on every control click event. Is there any possibility to do that globaly in whole application ? I'd like to click on some control, recognise it's type, name, parent form, etc...

regards


Answers (2)