Click here to Skip to main content
15,898,222 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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

Use this in KeyDown
C#
if (e.Control & e.KeyCode == Keys.Delete) {
    //code here
}
 
Share this answer
 
v2
Comments
Wendelius 5-Sep-11 1:13am    
Just beat me to it, my 5 :)
In KeyDown[^] event you can register if for example control is pressed. See the example in the documentation.
 
Share this answer
 
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, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900