System.Windows.Forms.MouseButtons Enumeration

Specifies constants that define which mouse button was pressed.

Syntax

[System.Runtime.InteropServices.ComVisible(true)]
[System.Flags]
public enum MouseButtons

Remarks

This enumeration is used by many classes, including System.Windows.Forms.AxHost, System.Windows.Forms.Control, System.Windows.Forms.DataGrid, System.Windows.Forms.Form, System.Windows.Forms.RadioButton, System.Windows.Forms.Splitter, System.Windows.Forms.StatusBar, and System.Windows.Forms.UpDownBase.

Members

Member NameDescription
Left

The left mouse button was pressed.

Middle

The middle mouse button was pressed.

None

No mouse button was pressed.

Right

The right mouse button was pressed.

XButton1

The first XButton was pressed.

XButton2

The second XButton was pressed.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0