I come to C# & Windows Forms programming from VB6, where it was easy to make a form respond predictably to the Enter and Escape keys using two (hidden?) buttons that have their Default and Cancel properties respectively set to True.
How do I do this in Windows Forms? Help, please!
AlanPosted Aug 28, 2007, 6:44 PM
The Form class's AcceptButton and CancelButton properties provide similar functionality:
http://msdn2.microsoft.com/en-us/library/system.windows.forms.form.acceptbutton(vs.80).aspx
http://msdn2.microsoft.com/en-us/library/system.windows.forms.form.cancelbutton(VS.80).aspx