Carlos Sanchez

Carlos Sanchez

  • NA
  • 264
  • 0

CancelButton Property

Jul 7 2004 10:58 AM
I'm doing a classic Windows Application in C#, I want to add a record in a Table. So, I Have a form with several TextBoxes and Three Buttons: "Add", "Delete", "Search", "Cancel", "Save" and "Exit". Initially, the TextBoxes are not enabled, when I click "Add" they are enabled, when I click "Cancel" they are not enabled again. So, I want when I press Esc (The Esc key) were like I click Cancel, then I set the CancelButton property of the form to "btnCancel" (btnCancel is the name of the Cancel Button), but when a press Esc the form is closed and I don't want that. Somebody can help me. What can I do?