The most basic use of a Win Forms Button control is to run some code when the button is clicked. The code can be as simple or as complex as needed.
To respond to a button click
[Visual Basic] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) MessageBox.Show "Button1 was clicked" End Sub [C#]
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 procedures for these related events, be sure that their actions don't conflict.
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.
Button Class | Button Control | Selecting a Button Control Programmatically