MouseEventArgs::Button Property

 

Gets which mouse button was pressed.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public:
property MouseButtons Button {
	MouseButtons get();
}

Property Value

Type: System.Windows.Forms::MouseButtons

One of the MouseButtons values.

The following code example handles the MouseDown event on a TextBox control so that clicking the right mouse button selects all the text in the control. This example requires that you have a form that contains a TextBox control named textBox1.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: