Files
docs-desktop/dotnet-desktop-guide/framework/winforms/controls/designate-a-wf-button-as-the-cancel-button-using-the-designer.md
T
Andy De George c0ba284473 Initial winforms content migrated (#18)
* Merge winforms framework content to working branch (#14)

* Breadcrumb / TOC / Move net5 to net folder (#15)

* change path from net5 to net

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Add .net 5 winforms placeholder article (#16)

* added some metadata and adjusted net5 placeholder

* corrections

* corrections

* corrections

* Test1

* Swapping landing page vs concept

* fix links

* Fix links

* Fix desc
2020-09-01 16:26:21 -07:00

1.5 KiB

title, ms.date, helpviewer_keywords, ms.assetid
title ms.date helpviewer_keywords ms.assetid
Designate a Button as the Cancel Button Using the Designer 03/30/2017
buttons [Windows Forms], cancel buttons
Button control [Windows Forms], designating as cancel button
30e77d9c-d565-4ab5-a84a-62c043af8822

How to: Designate a Windows Forms Button as the Cancel Button Using the Designer

On any Windows Form, you can designate a xref:System.Windows.Forms.Button control to be the cancel button. A cancel button is clicked whenever the user presses the ESC key, regardless of which other control on the form has the focus. Such a button is usually programmed to enable the user to quickly exit an operation without committing to any action.

To designate the cancel button

  1. Select the form on which the button resides.

  2. In the Properties window, set the form's xref:System.Windows.Forms.Form.CancelButton%2A property to the xref:System.Windows.Forms.Button control's name.

See also