Tip for Windows Forms developers - use Form.CancelButton on your modal dialogs
The problem occurs when the CancelButton property on the Form isn't set. In a properly coded modal dialog, you set this property to be your cancel button, and the framework handles dismissing the dialog when the escape key is pressed. However, if you directly set the DialogResult of the cancel button to Cancel but don't set the CancelButton property on the form, clicking on the cancel button will dismiss the dialog, but hitting escape will not. If you're only testing with the mouse, everything appears to work as expected.
I reported this as a bug against Whidbey, but MS doesn't seem inclined to change it. So please, people, set that CancelButton property. Take pity on a poor keyboard addicted soul.