Raising a Button Click event programmatically
When developing windows (C#) forms, as developers we are very much concerning about speedup data entering of users. Minimizing use of mouse, use of tab key to move courser from one text box to another, etc. are main methods can increase data entering speed. Other than that use shortcut key for button operations is also speed up the data entering. As an example thinks that we can assign F2 key for data saving and F3 for deleting addition to having Save and Delete buttons. According to our common practice we are write the code to save the record under button click event of “Save” button. private void btnSave_Click( object sender, EventArgs e) { //The code goes here } private void btnEdit_Click( object sender, EventArgs e) { //The code goes here } To execute same method for F2 key press event, we have to override inherited method of the form which called ProcessDialogKey. Parameters keyData One of the Keys values that repr...