163 references to Right
System.Windows.Forms (26)
System\Windows\Forms\Control.cs (5)
2551buttons |= MouseButtons.Right; 11571if (button == MouseButtons.Right) 12455WmMouseDown(ref m, MouseButtons.Right, 2); 12464WmMouseDown(ref m, MouseButtons.Right, 1); 12468WmMouseUp(ref m, MouseButtons.Right, 1);
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (3)
1628OnMouseDown(new MouseEventArgs(MouseButtons.Right, 1, Ptrc.X, Ptrc.Y, 0)); 1704OnMouseDown(new MouseEventArgs(MouseButtons.Right, 1, Pt.X, Pt.Y, 0)); 1724OnMouseUp(new MouseEventArgs(MouseButtons.Right, 1, ptRBtnUp.X, ptRBtnUp.Y, 0));
System\Windows\Forms\Controls\ListView\ListView.cs (5)
6522OnItemDrag(new ItemDragEventArgs(MouseButtons.Right, item)); 6649MouseButtons button = nmhdr->code == PInvoke.NM_CLICK ? MouseButtons.Left : MouseButtons.Right; 7008WmMouseDown(ref m, MouseButtons.Right, 2); 7011WmMouseDown(ref m, MouseButtons.Right, 1); 7012_downButton = MouseButtons.Right;
System\Windows\Forms\Controls\RichTextBox\RichTextBox.OleCallback.cs (2)
102if ((mouseButtons & MouseButtons.Right) == MouseButtons.Right)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (1)
2573if (e.Button == MouseButtons.Left || (e.Button == MouseButtons.Right && _state[s_stateSupportsRightClick]))
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
872(e.Button == MouseButtons.Right && SupportsRightClick))
System\Windows\Forms\Controls\TreeView\TreeView.cs (5)
3017TvnBeginDrag(MouseButtons.Right, nmtv); 3037button = nmtv->hdr.code == PInvoke.NM_CLICK ? MouseButtons.Left : MouseButtons.Right; 3372WmMouseDown(ref m, MouseButtons.Right, 2); 3395WmMouseDown(ref m, MouseButtons.Right, 1); 3396_downButton = MouseButtons.Right;
System\Windows\Forms\Controls\WebBrowser\HtmlElementEventArgs.cs (1)
36buttons |= MouseButtons.Right;
System\Windows\Forms\NotifyIcon.cs (3)
756WmMouseDown(MouseButtons.Right, 2); 759WmMouseDown(MouseButtons.Right, 1); 767WmMouseUp(MouseButtons.Right);
System.Windows.Forms.Design (13)
System\Drawing\Design\ColorEditor.ColorPalette.cs (1)
347else if (me.Button == MouseButtons.Right)
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.cs (3)
358if (_behaviorService.OnMouseDown(MouseButtons.Right, mouseLoc)) 382if (_behaviorService.OnMouseUp(MouseButtons.Right)) 406if (_behaviorService.OnMouseDoubleClick(MouseButtons.Right, mouseLoc))
System\Windows\Forms\Design\ControlDesigner.cs (5)
1847? MouseButtons.Right 1870? MouseButtons.Right 1925else if (button == MouseButtons.Right) 1946button = MouseButtons.Right; 1993? MouseButtons.Right
System\Windows\Forms\Design\SelectionUIService.cs (1)
735if (me.Button == MouseButtons.Right && oldContainerDrag is not null && !oldDragMoved)
System\Windows\Forms\Design\ToolStripItemBehavior.cs (1)
457if (glyph is not null && button == MouseButtons.Right)
System\Windows\Forms\Design\ToolStripTemplateNode.cs (2)
461if (e.Button == MouseButtons.Right) 1152if (e.Button == MouseButtons.Right)
System.Windows.Forms.Tests (118)
System\Windows\Forms\ButtonBaseTests.cs (44)
6098yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 0, 0, 0, 0) }; 6100yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 1, 0, 0, 0) }; 6102yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 2, 0, 0, 0) }; 6104yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, 0, 0, 0) }; 6147yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 0, 0, 0, 0), 0 }; 6149yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 1, 0, 0, 0), 0 }; 6151yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 2, 0, 0, 0), 0 }; 6153yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, 0, 0, 0), 0 }; 6511yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 0, 0, 0, 0) }; 6513yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 1, 0, 0, 0) }; 6515yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 2, 0, 0, 0) }; 6517yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, 0, 0, 0) }; 6518yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, -1, 0, 0) }; 6519yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, 0, -1, 0) }; 6625yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 0, 0, 0, 0), 0 }; 6627yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 1, 0, 0, 0), 0 }; 6629yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 2, 0, 0, 0), 0 }; 6631yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, 0, 0, 0), 0 }; 6632yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, -1, 0, 0), 0 }; 6633yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, 0, -1, 0), 0 }; 6689yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 0, 0, 0, 0), 0 }; 6691yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 1, 0, 0, 0), 0 }; 6693yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 2, 0, 0, 0), 0 }; 6695yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, 0, 0, 0), 0 }; 6696yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, -1, 0, 0), 1 }; 6697yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, 0, -1, 0), 1 }; 6698yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, -1, -1, 0), 1 }; 6699yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, int.MaxValue, int.MaxValue, 0), 1 }; 6756yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 0, 0, 0, 0), 1 }; 6758yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 1, 0, 0, 0), 1 }; 6760yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 2, 0, 0, 0), 1 }; 6762yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, 0, 0, 0), 1 }; 6763yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, -1, 0, 0), 0 }; 6764yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, 0, -1, 0), 0 }; 6765yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, -1, -1, 0), 0 }; 6766yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, int.MaxValue, int.MaxValue, 0), 0 }; 6831yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Right, 1, 2, 3, 4) }; 6835yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Right, 1, 2, 3, 4) }; 8840yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONUP, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, 0, 0 }; 8841yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, 1, 2 }; 8842yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, -1, -2 }; 8843yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONUP, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, 0, 0 }; 8844yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, 1, 2 }; 8845yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, -1, -2 };
System\Windows\Forms\ButtonTests.cs (14)
2252yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Right, 0, 0, 0, 0) }; 2254yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Right, 1, 0, 0, 0) }; 2256yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Right, 2, 0, 0, 0) }; 2258yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Right, 3, 0, 0, 0) }; 2297yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Right, 0, 0, 0, 0), 0 }; 2299yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Right, 1, 0, 0, 0), 0 }; 2301yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Right, 2, 0, 0, 0), 0 }; 2303yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Right, 3, 0, 0, 0), 0 }; 2646yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Right, 1, 2, 3, 4) }; 2650yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Right, 1, 2, 3, 4) }; 2698yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Right, 1, 2, 3, 4), false }; 2702yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Right, 1, 2, 3, 4), false }; 2802yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Right, 1, 2, 3, 4), 0 }; 2806yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Right, 1, 2, 3, 4), 0 };
System\Windows\Forms\ControlTests.Methods.cs (18)
13416yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, 0, 0 }; 13417yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, 1, 2 }; 13418yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, -1, -2 }; 13419yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, 0, 0 }; 13420yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, 1, 2 }; 13421yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, -1, -2 }; 13423yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 2, 0, 0 }; 13424yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 2, 1, 2 }; 13425yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 2, -1, -2 }; 13426yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 2, 0, 0 }; 13427yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 2, 1, 2 }; 13428yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 2, -1, -2 }; 13779yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONUP, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, 0, 0 }; 13780yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, 1, 2 }; 13781yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, -1, -2 }; 13782yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONUP, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, 0, 0 }; 13783yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, 1, 2 }; 13784yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, -1, -2 };
System\Windows\Forms\ControlTests.Properties.cs (2)
9263[InlineData(0, 0, byte.MaxValue, 0, 0, MouseButtons.Right)] 9266[InlineData(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, MouseButtons.Left | MouseButtons.Middle | MouseButtons.Right | MouseButtons.XButton1 | MouseButtons.XButton2)]
System\Windows\Forms\PropertyGridTests.cs (8)
3703yield return new object[] { new MouseEventArgs(MouseButtons.Right, 0, 0, 0, 0), false }; 3705yield return new object[] { new MouseEventArgs(MouseButtons.Right, 1, 0, 0, 0), false }; 3707yield return new object[] { new MouseEventArgs(MouseButtons.Right, 2, 0, 0, 0), false }; 3709yield return new object[] { new MouseEventArgs(MouseButtons.Right, 3, 0, 0, 0), false }; 3804yield return new object[] { new MouseEventArgs(MouseButtons.Right, 0, 0, 0, 0) }; 3806yield return new object[] { new MouseEventArgs(MouseButtons.Right, 1, 0, 0, 0) }; 3808yield return new object[] { new MouseEventArgs(MouseButtons.Right, 2, 0, 0, 0) }; 3810yield return new object[] { new MouseEventArgs(MouseButtons.Right, 3, 0, 0, 0) };
System\Windows\Forms\RadioButtonTests.cs (6)
1051yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Right, 1, 2, 3, 4) }; 1055yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Right, 1, 2, 3, 4) }; 1104yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Right, 1, 2, 3, 4), false }; 1108yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Right, 1, 2, 3, 4), false }; 1207yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Right, 1, 2, 3, 4) }; 1211yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Right, 1, 2, 3, 4) };
System\Windows\Forms\TreeViewTests.cs (2)
5701yield return new object[] { new ItemDragEventArgs(MouseButtons.Right, new object()) }; 6418yield return new object[] { new TreeNodeMouseClickEventArgs(new TreeNode(), MouseButtons.Right, 1, 2, 3) };
System\Windows\Forms\UpDownBaseTests.cs (4)
2004yield return new object[] { new MouseEventArgs(MouseButtons.Right, 0, 0, 0, 0) }; 2006yield return new object[] { new MouseEventArgs(MouseButtons.Right, 1, 0, 0, 0) }; 2008yield return new object[] { new MouseEventArgs(MouseButtons.Right, 2, 0, 0, 0) }; 2010yield return new object[] { new MouseEventArgs(MouseButtons.Right, 3, 0, 0, 0) };
TextBoxBaseTests.cs (16)
5587yield return new object[] { new MouseEventArgs(MouseButtons.Right, 0, 0, 0, 0) }; 5589yield return new object[] { new MouseEventArgs(MouseButtons.Right, 1, 0, 0, 0) }; 5591yield return new object[] { new MouseEventArgs(MouseButtons.Right, 2, 0, 0, 0) }; 5593yield return new object[] { new MouseEventArgs(MouseButtons.Right, 3, 0, 0, 0) }; 7195yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, 0, 0 }; 7196yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, 1, 2 }; 7197yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, -1, -2 }; 7198yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, 0, 0 }; 7199yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, 1, 2 }; 7200yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, -1, -2 }; 7202yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 2, 0, 0 }; 7203yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 2, 1, 2 }; 7204yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 2, -1, -2 }; 7205yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 2, 0, 0 }; 7206yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 2, 1, 2 }; 7207yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 2, -1, -2 };
TrackBarTests.cs (4)
2542yield return new object[] { new MouseEventArgs(MouseButtons.Right, 0, 0, 0, 0) }; 2544yield return new object[] { new MouseEventArgs(MouseButtons.Right, 1, 0, 0, 0) }; 2546yield return new object[] { new MouseEventArgs(MouseButtons.Right, 2, 0, 0, 0) }; 2548yield return new object[] { new MouseEventArgs(MouseButtons.Right, 3, 0, 0, 0) };
System.Windows.Forms.UI.IntegrationTests (6)
Input\InputBuilder.cs (2)
87MouseButtons.Right => MOUSE_EVENT_FLAGS.MOUSEEVENTF_RIGHTDOWN, 109MouseButtons.Right => MOUSE_EVENT_FLAGS.MOUSEEVENTF_RIGHTUP,
Input\MouseSimulator.cs (4)
63return ButtonDown(MouseButtons.Right); 68return ButtonUp(MouseButtons.Right); 73return ButtonClick(MouseButtons.Right); 78return ButtonDoubleClick(MouseButtons.Right);