31 December 2012

Shortcut key for Button in Windows Application

              Validation is an important portion in the Application Side.Some User wants to use Keyboard .So I give this Code for Shortcut Key for Button in Windows Application.
Step by step Procedure:
Create Form.
Drag and Drop your Button in the Form.
Give a name for button(like btn_Ok)
Give a text for button (like this &ok)
Click the Button.

 private void btn_Ok_Click(object sender, EventArgs e)
            MessageBox.Show("Thank you");

 Run your Application .

Click Alt+O Key
MessageBox will display.

No comments: