Name

MouseButtons

Synopsis

This enumeration is used throughout the framework to specify which mouse buttons are currently pressed. It is decorated with the FlagsAttribute, so the values may be combined with one of the logical operators (and you should test with the & operator rather than simple equality, as more than one bit may be set).


public enum MouseButtons {

   None = 0x00000000,

   Left = 0x00100000,

   Right = 0x00200000,

   Middle = 0x00400000,

   XButton1 = 0x00800000,

   XButton2 = 0x01000000

}

Hierarchy

System.Object System.ValueType System.Enum(System.IComparabl, System.IFormattable, System.IConvertible) MouseButtons

Returned By

Control.MouseButtons, ItemDragEventArgs.Button, MouseEventArgs.Button

Passed To

ItemDragEventArgs.ItemDragEventArgs(), MouseEventArgs.MouseEventArgs(), StatusBarPanelClickEventArgs.StatusBarPanelClickEventArgs()

Get .NET Windows Forms in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.