Click here to Skip to main content
14,447,535 members
Rate this:
Please Sign up or sign in to vote.
See more:
hi how can i use multiple key in key press event? for example how can i use (ctrl + del) in the keypress of a textbox???????
Posted
Rate this:
Please Sign up or sign in to vote.

Solution 1

Use this in KeyDown
if (e.Control & e.KeyCode == Keys.Delete) {
    //code here
}
   
v2
Comments
Wendelius 5-Sep-11 1:13am
   
Just beat me to it, my 5 :)
Rate this:
Please Sign up or sign in to vote.

Solution 2

In KeyDown[^] event you can register if for example control is pressed. See the example in the documentation.
   
Comments
a.bolandnataj106 5-Sep-11 1:17am
   
Thanks a Lot
Wendelius 5-Sep-11 1:19am
   
No problem :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100