Total .NET Analyzer Rule Documentation  

FormCancelButton Rule

Consider setting the form's CancelButton property.

Remarks

A form's CancelButton property sets the button on the form that is invoked when the user presses [Esc]. This property allows you to designate a default action to occur. If you don't set the CancelButton property, the form has no default reaction to [Esc].

Resolution

If you want to designate a default action to occur when a user presses [Esc] on a form, set the Form.CancelButton property. You can set this property in the form's properties window to any Button Control on the current form.

See Also

Form.CancelButton Property

IButtonControl Interface