245 references to MouseButtons
System.Web.Mobile (4)
UI\MobileControls\Design\StylesEditorDialog.cs (2)
933
if (e.Button ==
MouseButtons
.Right)
942
if (e.Button ==
MouseButtons
.Right)
UI\MobileControls\Design\Util\EditableTreeList.cs (2)
276
if (e.Button ==
MouseButtons
.Right)
285
if (e.Button ==
MouseButtons
.Right)
System.Windows.Forms (218)
winforms\Managed\System\WinForms\AxHost.cs (3)
5087
base.OnMouseMove(new MouseEventArgs( (
MouseButtons
)(((int)button) << 20), 1, x, y, 0));
5114
base.OnMouseUp(new MouseEventArgs((
MouseButtons
)(((int)button) << 20), 1, x, y, 0));
5141
base.OnMouseDown(new MouseEventArgs((
MouseButtons
)(((int)button) << 20), 1, x, y, 0));
winforms\Managed\System\WinForms\Button.cs (1)
297
if (mevent.Button ==
MouseButtons
.Left && MouseIsPressed) {
winforms\Managed\System\WinForms\ButtonBase.cs (2)
873
if (mevent.Button !=
MouseButtons
.None && GetFlag(FlagMousePressed)) {
902
if (mevent.Button ==
MouseButtons
.Left) {
winforms\Managed\System\WinForms\CheckBox.cs (1)
644
if (mevent.Button ==
MouseButtons
.Left && MouseIsPressed) {
winforms\Managed\System\WinForms\ComboBox.cs (13)
1786
OnMouseDown(new MouseEventArgs(
MouseButtons
.Left, 1, Ptlc.X, Ptlc.Y, 0));
1802
OnMouseDown(new MouseEventArgs(
MouseButtons
.Middle, 1, Ptmc.X, Ptmc.Y, 0));
1818
OnMouseDown(new MouseEventArgs(
MouseButtons
.Right, 1, Ptrc.X, Ptrc.Y, 0));
1832
OnMouseDown(new MouseEventArgs(
MouseButtons
.Left, 1, Ptl.X, Ptl.Y, 0));
1853
OnClick(new MouseEventArgs(
MouseButtons
.Left, 1, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0));
1854
OnMouseClick(new MouseEventArgs(
MouseButtons
.Left, 1, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0));
1870
OnMouseUp(new MouseEventArgs(
MouseButtons
.Left, 1, pt.X, pt.Y, 0));
1883
OnMouseDown(new MouseEventArgs(
MouseButtons
.Middle, 1, P.X, P.Y, 0));
1901
OnMouseDown(new MouseEventArgs(
MouseButtons
.Right, 1, Pt.X, Pt.Y, 0));
1910
OnMouseUp(new MouseEventArgs(
MouseButtons
.Middle, 1, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0));
1924
OnMouseUp(new MouseEventArgs(
MouseButtons
.Right, 1, ptRBtnUp.X, ptRBtnUp.Y, 0));
3739
OnClick(new MouseEventArgs(
MouseButtons
.Left, 1, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0));
3740
OnMouseClick(new MouseEventArgs(
MouseButtons
.Left, 1, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0));
winforms\Managed\System\WinForms\Control.cs (27)
3355
public static
MouseButtons
MouseButtons {
3357
MouseButtons
buttons = (
MouseButtons
)0;
3360
if (UnsafeNativeMethods.GetKeyState((int)Keys.LButton) < 0) buttons |=
MouseButtons
.Left;
3361
if (UnsafeNativeMethods.GetKeyState((int)Keys.RButton) < 0) buttons |=
MouseButtons
.Right;
3362
if (UnsafeNativeMethods.GetKeyState((int)Keys.MButton) < 0) buttons |=
MouseButtons
.Middle;
3363
if (UnsafeNativeMethods.GetKeyState((int)Keys.XButton1) < 0) buttons |=
MouseButtons
.XButton1;
3364
if (UnsafeNativeMethods.GetKeyState((int)Keys.XButton2) < 0) buttons |=
MouseButtons
.XButton2;
6639
private
MouseButtons
GetXButton(int wparam) {
6642
return
MouseButtons
.XButton1;
6644
return
MouseButtons
.XButton2;
6647
return
MouseButtons
.None;
13347
private void WmMouseDown(ref Message m,
MouseButtons
button, int clicks) {
13353
MouseButtons
realState = MouseButtons;
13369
if (button ==
MouseButtons
.Left && GetStyle(ControlStyles.Selectable)) {
13483
private void WmMouseUp(ref Message m,
MouseButtons
button, int clicks) {
13502
if (button ==
MouseButtons
.Right) {
13553
HandledMouseEventArgs e = new HandledMouseEventArgs(
MouseButtons
.None,
14288
WmMouseDown(ref m,
MouseButtons
.Left, 2);
14294
WmMouseDown(ref m,
MouseButtons
.Left, 1);
14297
WmMouseUp(ref m,
MouseButtons
.Left, 1);
14300
WmMouseDown(ref m,
MouseButtons
.Middle, 2);
14306
WmMouseDown(ref m,
MouseButtons
.Middle, 1);
14309
WmMouseUp(ref m,
MouseButtons
.Middle, 1);
14360
WmMouseDown(ref m,
MouseButtons
.Right, 2);
14366
WmMouseDown(ref m,
MouseButtons
.Right, 1);
14369
WmMouseUp(ref m,
MouseButtons
.Right, 1);
winforms\Managed\System\WinForms\DataGrid.cs (4)
4026
if (e.Button !=
MouseButtons
.Left)
4261
MouseButtons
mouse = MouseButtons;
4262
if (lastRowSelected != -1 && (mouse &
MouseButtons
.Left) ==
MouseButtons
.Left
winforms\Managed\System\WinForms\DataGridView.cs (1)
7051
public
MouseButtons
button;
winforms\Managed\System\WinForms\DataGridViewButtonCell.cs (5)
485
return e.Button ==
MouseButtons
.Left;
503
return e.Button ==
MouseButtons
.Left;
565
if (e.Button ==
MouseButtons
.Left && mouseInContentBounds)
618
Control.MouseButtons ==
MouseButtons
.Left)
643
if (e.Button ==
MouseButtons
.Left)
winforms\Managed\System\WinForms\DataGridViewCell.cs (1)
3461
if (e.Button ==
MouseButtons
.Left && GetContentBounds(e.RowIndex).Contains(x, y))
winforms\Managed\System\WinForms\DataGridViewCheckBoxCell.cs (5)
880
return e.Button ==
MouseButtons
.Left;
898
return e.Button ==
MouseButtons
.Left;
997
if (e.Button ==
MouseButtons
.Left && mouseInContentBounds)
1050
Control.MouseButtons ==
MouseButtons
.Left)
1075
if (e.Button ==
MouseButtons
.Left)
winforms\Managed\System\WinForms\DataGridViewHeaderCell.cs (5)
531
return e.Button ==
MouseButtons
.Left && this.DataGridView.ApplyVisualStylesToHeaderCells;
551
return e.Button ==
MouseButtons
.Left && this.DataGridView.ApplyVisualStylesToHeaderCells;
561
if (e.Button ==
MouseButtons
.Left &&
581
Control.MouseButtons ==
MouseButtons
.Left &&
617
if (e.Button ==
MouseButtons
.Left && this.DataGridView.ApplyVisualStylesToHeaderCells)
winforms\Managed\System\WinForms\DataGridViewMethods.cs (15)
5866
if (e.Button ==
MouseButtons
.Left &&
5918
if (e.Button ==
MouseButtons
.Left &&
5927
if (e.Button ==
MouseButtons
.Left &&
12280
if (!this.dataGridViewState2[DATAGRIDVIEWSTATE2_messageFromEditingCtrls] && e.Button ==
MouseButtons
.Left)
12328
if (!this.dataGridViewState2[DATAGRIDVIEWSTATE2_messageFromEditingCtrls] && e.Button ==
MouseButtons
.Left)
13019
e.Button ==
MouseButtons
.Left &&
13936
if (!e.Handled && e.Button ==
MouseButtons
.Left && e.ColumnIndex < this.Columns.Count)
14107
if (e.Button ==
MouseButtons
.Left &&
15446
me.Button ==
MouseButtons
.Left)
16328
(e.Button !=
MouseButtons
.Left ||
16346
if (e.Button ==
MouseButtons
.Left)
16899
if ((ModifierKeys & (Keys.Shift | Keys.Alt)) != 0 || MouseButtons !=
MouseButtons
.None)
18075
if (!e.Handled && e.Button ==
MouseButtons
.Left && e.RowIndex < this.Rows.Count)
26351
if (MouseButtons !=
MouseButtons
.None)
26462
if (MouseButtons !=
MouseButtons
.None)
winforms\Managed\System\WinForms\DataGridViewTextBoxCell.cs (1)
604
if (ptCurrentCell.X == e.ColumnIndex && ptCurrentCell.Y == e.RowIndex && e.Button ==
MouseButtons
.Left)
winforms\Managed\System\WinForms\Form.cs (1)
7617
if (CaptureInternal && MouseButtons == (
MouseButtons
)0) {
winforms\Managed\System\WinForms\HandledMouseEvent.cs (2)
19
public HandledMouseEventArgs(
MouseButtons
button, int clicks, int x, int y, int delta) : this(button, clicks, x, y, delta, false)
24
public HandledMouseEventArgs(
MouseButtons
button, int clicks, int x, int y, int delta, bool defaultHandledValue) : base(button, clicks, x, y, delta)
winforms\Managed\System\WinForms\HelpProvider.cs (1)
196
if (Control.MouseButtons !=
MouseButtons
.None && helpString != null) {
winforms\Managed\System\WinForms\HtmlElementEventArgs.cs (6)
44
public
MouseButtons
MouseButtonsPressed {
46
MouseButtons
buttons =
MouseButtons
.None;
49
buttons |=
MouseButtons
.Left;
52
buttons |=
MouseButtons
.Right;
55
buttons |=
MouseButtons
.Middle;
winforms\Managed\System\WinForms\ItemDragEvent.cs (4)
25
readonly
MouseButtons
button;
32
public ItemDragEventArgs(
MouseButtons
button) {
41
public ItemDragEventArgs(
MouseButtons
button, object item) {
50
public
MouseButtons
Button {
winforms\Managed\System\WinForms\LinkLabelLinkClickedEvent.cs (4)
26
private readonly
MouseButtons
button;
35
this.button =
MouseButtons
.Left;
38
public LinkLabelLinkClickedEventArgs(LinkLabel.Link link,
MouseButtons
button) : this(link) {
47
public
MouseButtons
Button {
winforms\Managed\System\WinForms\ListBox.cs (4)
2421
OnClick(new MouseEventArgs(
MouseButtons
.Left, 1, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0));
2422
OnMouseClick(new MouseEventArgs(
MouseButtons
.Left, 1, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0));
2430
OnDoubleClick(new MouseEventArgs(
MouseButtons
.Left, 2, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0));
2431
OnMouseDoubleClick(new MouseEventArgs(
MouseButtons
.Left, 2, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0));
winforms\Managed\System\WinForms\ListView.cs (18)
136
private
MouseButtons
downButton;
4055
private void LvnBeginDrag(
MouseButtons
buttons, NativeMethods.NMLISTVIEW nmlv) {
5407
private void WmMouseDown(ref Message m,
MouseButtons
button, int clicks) {
5863
LvnBeginDrag(
MouseButtons
.Left, nmlv);
5876
LvnBeginDrag(
MouseButtons
.Right, nmlv);
5973
MouseButtons
button = nmhdr->code == NativeMethods.NM_CLICK ?
MouseButtons
.Left :
MouseButtons
.Right;
6260
WmMouseDown(ref m,
MouseButtons
.Left, 2);
6268
WmMouseDown(ref m,
MouseButtons
.Left, 1);
6269
downButton =
MouseButtons
.Left;
6298
WmMouseDown(ref m,
MouseButtons
.Middle, 2);
6301
WmMouseDown(ref m,
MouseButtons
.Middle, 1);
6302
downButton =
MouseButtons
.Middle;
6305
WmMouseDown(ref m,
MouseButtons
.Right, 2);
6308
WmMouseDown(ref m,
MouseButtons
.Right, 1);
6309
downButton =
MouseButtons
.Right;
6312
if (listViewState[LISTVIEWSTATE_expectingMouseUp] && !listViewState[LISTVIEWSTATE_mouseUpFired] && MouseButtons ==
MouseButtons
.None)
winforms\Managed\System\WinForms\MouseEvent.cs (9)
31
private readonly
MouseButtons
button;
60
public MouseEventArgs(
MouseButtons
button, int clicks, int x, int y, int delta) {
61
Debug.Assert((button & (
MouseButtons
.Left |
MouseButtons
.None |
MouseButtons
.Right |
MouseButtons
.Middle |
MouseButtons
.XButton1 |
MouseButtons
.XButton2)) ==
77
public
MouseButtons
Button {
winforms\Managed\System\WinForms\NotifyIcon.cs (11)
810
private void WmMouseDown(ref Message m,
MouseButtons
button, int clicks) {
833
private void WmMouseUp(ref Message m,
MouseButtons
button) {
854
WmMouseDown(ref msg,
MouseButtons
.Left, 2);
857
WmMouseDown(ref msg,
MouseButtons
.Left, 1);
860
WmMouseUp(ref msg,
MouseButtons
.Left);
863
WmMouseDown(ref msg,
MouseButtons
.Middle, 2);
866
WmMouseDown(ref msg,
MouseButtons
.Middle, 1);
869
WmMouseUp(ref msg,
MouseButtons
.Middle);
875
WmMouseDown(ref msg,
MouseButtons
.Right, 2);
878
WmMouseDown(ref msg,
MouseButtons
.Right, 1);
884
WmMouseUp(ref msg,
MouseButtons
.Right);
winforms\Managed\System\WinForms\PropertyGrid.cs (1)
3144
if (target != null && me.Button ==
MouseButtons
.Left) {
winforms\Managed\System\WinForms\PropertyGridInternal\GridEntry.cs (3)
2303
public virtual bool OnMouseClick(int x, int y, int count,
MouseButtons
button) {
2309
if ((button &
MouseButtons
.Left) !=
MouseButtons
.Left) {
winforms\Managed\System\WinForms\PropertyGridInternal\PropertyDescriptorGridEntry.cs (3)
586
public override bool OnMouseClick(int x, int y, int count,
MouseButtons
button) {
587
if (pvUIItems != null && count == 2 && ((button &
MouseButtons
.Left) ==
MouseButtons
.Left)) {
winforms\Managed\System\WinForms\PropertyGridInternal\PropertyGridView.cs (5)
3170
if (me.Button ==
MouseButtons
.Left && SplitterInside(me.X,me.Y) && totalProps != 0) {
3206
if (me.Button ==
MouseButtons
.Left) {
3317
if ((ModifierKeys & (Keys.Shift | Keys.Alt)) != 0 || MouseButtons !=
MouseButtons
.None) {
5788
if (e.Button ==
MouseButtons
.Left) {
5896
if (e.Button ==
MouseButtons
.Left) {
winforms\Managed\System\WinForms\RadioButton.cs (2)
468
if (MouseButtons ==
MouseButtons
.None) {
571
if (mevent.Button ==
MouseButtons
.Left && GetStyle(ControlStyles.UserPaint)) {
winforms\Managed\System\WinForms\RichTextBox.cs (7)
3872
MouseButtons
b = Control.MouseButtons;
3882
if ((b &
MouseButtons
.Left) ==
MouseButtons
.Left) {
3886
if ((b &
MouseButtons
.Right) ==
MouseButtons
.Right) {
3890
if ((b &
MouseButtons
.Middle) ==
MouseButtons
.Middle) {
winforms\Managed\System\WinForms\SplitContainer.cs (1)
1319
if (e.Button ==
MouseButtons
.Left && e.Clicks == 1 && !IsSplitterFixed) {
winforms\Managed\System\WinForms\Splitter.cs (1)
879
if (e.Button ==
MouseButtons
.Left && e.Clicks == 1) {
winforms\Managed\System\WinForms\StatusBar.cs (6)
1069
MouseButtons
button =
MouseButtons
.Left;
1073
button =
MouseButtons
.Left;
1077
button =
MouseButtons
.Right;
1081
button =
MouseButtons
.Left;
1085
button =
MouseButtons
.Right;
winforms\Managed\System\WinForms\StatusBarPanelClickEvent.cs (1)
37
public StatusBarPanelClickEventArgs(StatusBarPanel statusBarPanel,
MouseButtons
button, int clicks, int x, int y)
winforms\Managed\System\WinForms\TextBox.cs (2)
637
if (SelectionLength == 0 && Control.MouseButtons ==
MouseButtons
.None) {
877
MouseButtons
realState = MouseButtons;
winforms\Managed\System\WinForms\TextBoxBase.cs (1)
1686
if (mevent.Button ==
MouseButtons
.Left) {
winforms\Managed\System\WinForms\ToolStripDropDownButton.cs (2)
127
(e.Button ==
MouseButtons
.Left)) {
143
(e.Button ==
MouseButtons
.Left)) {
winforms\Managed\System\WinForms\ToolStripGrip.cs (1)
129
return (Control.MouseButtons ==
MouseButtons
.Left) && (Control.ModifierKeys == Keys.None);
winforms\Managed\System\WinForms\ToolStripItem.cs (3)
2927
if (e.Button ==
MouseButtons
.Left) {
2954
if (e.Button ==
MouseButtons
.Left || (e.Button ==
MouseButtons
.Right && state[stateSupportsRightClick])) {
winforms\Managed\System\WinForms\ToolStripMenuItem.cs (2)
971
if (e.Button ==
MouseButtons
.Left ||
972
(e.Button ==
MouseButtons
.Right && SupportsRightClick)) {
winforms\Managed\System\WinForms\ToolStripSplitButton.cs (3)
515
if (e.Button ==
MouseButtons
.Left) {
544
if (e.Button ==
MouseButtons
.Left) {
557
if ((e.Button ==
MouseButtons
.Left) && this.SplitButtonButton.Bounds.Contains(clickPoint)) {
winforms\Managed\System\WinForms\TrackBar.cs (1)
980
if ((ModifierKeys & (Keys.Shift | Keys.Alt)) != 0 || MouseButtons !=
MouseButtons
.None) {
winforms\Managed\System\WinForms\TreeNodeClickEventArgs.cs (1)
33
public TreeNodeMouseClickEventArgs(TreeNode node,
MouseButtons
button, int clicks, int x, int y)
winforms\Managed\System\WinForms\TreeView.cs (19)
151
private
MouseButtons
downButton;
2473
private unsafe void TvnBeginDrag(
MouseButtons
buttons, NativeMethods.NMTREEVIEW* nmtv) {
2655
private void WmMouseDown(ref Message m,
MouseButtons
button, int clicks) {
2999
TvnBeginDrag(
MouseButtons
.Left, nmtv);
3003
TvnBeginDrag(
MouseButtons
.Right, nmtv);
3015
MouseButtons
button =
MouseButtons
.Left;
3026
?
MouseButtons
.Left :
MouseButtons
.Right;
3235
WmMouseDown(ref m,
MouseButtons
.Left, 2);
3265
OnMouseDown(new MouseEventArgs(
MouseButtons
.Left, 1, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0));
3278
WmMouseDown(ref m,
MouseButtons
.Left, 1);
3280
downButton =
MouseButtons
.Left;
3326
WmMouseDown(ref m,
MouseButtons
.Middle, 2);
3331
WmMouseDown(ref m,
MouseButtons
.Middle, 1);
3332
downButton =
MouseButtons
.Middle;
3341
WmMouseDown(ref m,
MouseButtons
.Right, 2);
3359
WmMouseDown(ref m,
MouseButtons
.Right, 1);
3360
downButton =
MouseButtons
.Right;
winforms\Managed\System\WinForms\UpDownBase.cs (9)
949
if (e.Clicks == 2 && e.Button ==
MouseButtons
.Left) {
964
if (mevent.Button ==
MouseButtons
.Left) {
996
if ((ModifierKeys & (Keys.Shift | Keys.Alt)) != 0 || MouseButtons !=
MouseButtons
.None) {
1292
if (e.Clicks == 2 && e.Button ==
MouseButtons
.Left) {
1310
if (e.Button ==
MouseButtons
.Left) {
1538
if (!parent.ValidationCancelled && e.Button ==
MouseButtons
.Left) {
1541
if (e.Clicks == 2 && e.Button ==
MouseButtons
.Left) {
1643
if (!parent.ValidationCancelled && e.Button ==
MouseButtons
.Left) {
1656
if (e.Button ==
MouseButtons
.Left) {
System.Workflow.ComponentModel (23)
AuthoringOM\Design\DesignerWidgets.cs (2)
440
if (e.Button ==
MouseButtons
.Left)
449
if (e.Button ==
MouseButtons
.Left)
AuthoringOM\Design\MessageFilters\ConnectionManager.cs (6)
83
if ((eventArgs.Button &
MouseButtons
.Left) ==
MouseButtons
.Left)
121
if ((eventArgs.Button &
MouseButtons
.Left) ==
MouseButtons
.Left)
198
if ((eventArgs.Button &
MouseButtons
.Left) ==
MouseButtons
.Left)
AuthoringOM\Design\MessageFilters\DragDropManager.cs (3)
88
if (eventArgs.Button ==
MouseButtons
.Left)
108
if (eventArgs.Button ==
MouseButtons
.Left)
117
else if (parentView.RootDesigner != null && this.dragStarted && (eventArgs.Button &
MouseButtons
.Left) > 0 && (Math.Abs(this.dragInitiationPoint.X - logicalPoint.X) > SystemInformation.DragSize.Width || Math.Abs(this.dragInitiationPoint.Y - logicalPoint.Y) > SystemInformation.DragSize.Height))
AuthoringOM\Design\MessageFilters\DragSelectionMessageFilter.cs (2)
48
if (eventArgs.Button ==
MouseButtons
.Left)
65
if (!this.dragStarted && (eventArgs.Button &
MouseButtons
.Left) > 0 &&
AuthoringOM\Design\MessageFilters\DynamicActionMessageFilter.cs (2)
120
if ((eventArgs.Button &
MouseButtons
.Left) > 0)
248
if ((eventArgs.Button &
MouseButtons
.Left) > 0)
AuthoringOM\Design\MessageFilters\FreeFormDragDropManager.cs (1)
101
if (eventArgs.Button ==
MouseButtons
.None)
AuthoringOM\Design\MessageFilters\PanningMessageFilter.cs (2)
65
if (eventArgs.Button ==
MouseButtons
.Left)
72
if (this.panningActive && (eventArgs.Button &
MouseButtons
.Left) > 0)
AuthoringOM\Design\MessageFilters\ResizingMessageFilter.cs (3)
26
if (eventArgs.Button ==
MouseButtons
.Left)
61
else if (eventArgs.Button ==
MouseButtons
.None)
74
if (this.designerToResize != null && eventArgs.Button ==
MouseButtons
.Left)
AuthoringOM\Design\MessageFilters\ZoomingMessageFilter.cs (2)
80
if (eventArgs.Button ==
MouseButtons
.Left)
115
if (eventArgs.Button ==
MouseButtons
.Left && CanContinueZooming)