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.
Run your 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");
}
{
MessageBox.Show("Thank you");
}
Click Alt+O Key
MessageBox will display.