For the button, how to detect whether it is ctrl + click a button, in the click event handler? I am using VS 2010 using C#.
            Asked
            
        
        
            Active
            
        
            Viewed 1,301 times
        
    0
            
            
        - 
                    4Metro? WinForms? WPF? Silverlight? Windows Phone? ASP.Net? MonoTouch? – SLaks Oct 26 '12 at 14:10
 - 
                    @Robuust - it's actually impossible to say if this is an exact duplicate since the code for WinForms and WPF are different. – JDB Oct 26 '12 at 18:21
 
1 Answers
4
            Are we talking about winforms, wpf or asp application? I will make a quick assumption that it's winforms, so here goes:
Form Form1;
button.Click += click;
private void click(object s, EventArgs e)
{
    if(Form1.ModifierKeys == Keys.Control)
    ... // Whatever you need here
}
        NeroS
        
- 1,179
 - 1
 - 12
 - 28