miercuri, 14 aprilie 2010

[WinForms][C#] How to know if CTRL key is pressed on a windows control?

In order to know if CTRL key is pressed on a windows control you can use the following code:

if ((System.Windows.Forms.Control.ModifierKeys & Keys.Control) == Keys.Control)
{
///... do multiple selection, for example
}


Niciun comentariu:

Trimiteți un comentariu