We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Detecting Ctrl-click in a mouse controller

Thread ID:

Created:

Updated:

Platform:

Replies:

7295 Sep 18,2003 04:25 PM UTC Sep 18,2003 10:11 PM UTC WinForms 1
loading
Tags: GridControl
Charles Hanson
Asked On September 18, 2003 04:25 PM UTC

I need to take a different action when the user is holding the control key while clicking with the mouse. How can I do this in the mouse controller? Is there a way to get the grid to pass key events into the mouse controller?

Sue Harris
Replied On September 18, 2003 10:11 PM UTC

> I need to take a different action when the user is holding the control key while clicking with the mouse. How can I do this in the mouse controller? Is there a way to get the grid to pass key events into the mouse controller? You can use the static Control property KeyModifiers to do this. (This example from the microsoft help.. copyright Microsoft Corporation etc etc): private void button1_Click(object sender, System.EventArgs e) { /* If the CTRL key is pressed when the * control is clicked, hide the control. */ if(Control.ModifierKeys == Keys.Control) { ((Control)sender).Hide(); } }

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;