When the user presses the Shift + UP keys, I want my form to respond by calling up a message box.
How do I do this in Windows Forms?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Handle the
KeyDownevent and have something like:The event handler has to be on the Main Form and you need to set the
KeyPreviewproperty totrue. This can be done in design mode from the properties dialog.