How to: Respond to Windows Forms Button Clicks
The most basic use of a Windows Forms Button control is to run some code when the button is clicked.
Clicking a Button control also generates a number of other events, such as the MouseEnter, MouseDown, and MouseUp events. If you intend to attach event handlers for these related events, be sure that their actions do not conflict. For example, if clicking the button clears information that the user has typed in a text box, pausing the mouse pointer over the button should not display a tool tip with that now-nonexistent information.
If the user attempts to double-click the Button control, each click will be processed separately; that is, the control does not support the double-click event.
To respond to a button click
In the button'sClick EventHandler write the code to run. Button1_Click must be bound to the control. For more information, see How to: Create Event Handlers at Run Time for Windows Forms.