128 references to Middle
System.Windows.Forms (20)
System\Windows\Forms\ActiveX\AxHost.cs (1)
175
Debug.Assert((int)MouseButtons.
Middle
== 0x00400000, "mb.middle mismatch");
System\Windows\Forms\Control.cs (4)
2555
buttons |= MouseButtons.
Middle
;
12352
WmMouseDown(ref m, MouseButtons.
Middle
, 2);
12361
WmMouseDown(ref m, MouseButtons.
Middle
, 1);
12365
WmMouseUp(ref m, MouseButtons.
Middle
, 1);
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (3)
1609
OnMouseDown(new MouseEventArgs(MouseButtons.
Middle
, 1, Ptmc.X, Ptmc.Y, 0));
1685
OnMouseDown(new MouseEventArgs(MouseButtons.
Middle
, 1, P.X, P.Y, 0));
1711
OnMouseUp(new MouseEventArgs(MouseButtons.
Middle
, 1, PARAM.ToPoint(m.LParamInternal)));
System\Windows\Forms\Controls\ListView\ListView.cs (3)
6997
WmMouseDown(ref m, MouseButtons.
Middle
, 2);
7000
WmMouseDown(ref m, MouseButtons.
Middle
, 1);
7001
_downButton = MouseButtons.
Middle
;
System\Windows\Forms\Controls\RichTextBox\RichTextBox.OleCallback.cs (2)
107
if ((mouseButtons & MouseButtons.
Middle
) == MouseButtons.
Middle
)
System\Windows\Forms\Controls\TreeView\TreeView.cs (3)
3357
WmMouseDown(ref m, MouseButtons.
Middle
, 2);
3362
WmMouseDown(ref m, MouseButtons.
Middle
, 1);
3363
_downButton = MouseButtons.
Middle
;
System\Windows\Forms\Controls\WebBrowser\HtmlElementEventArgs.cs (1)
42
buttons |= MouseButtons.
Middle
;
System\Windows\Forms\NotifyIcon.cs (3)
744
WmMouseDown(MouseButtons.
Middle
, 2);
747
WmMouseDown(MouseButtons.
Middle
, 1);
750
WmMouseUp(MouseButtons.
Middle
);
System.Windows.Forms.Tests (102)
System\Windows\Forms\ButtonBaseTests.cs (8)
6830
yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.
Middle
, 1, 2, 3, 4) };
6834
yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.
Middle
, 1, 2, 3, 4) };
8833
yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONUP, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.
Middle
, 1, 0, 0 };
8834
yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.
Middle
, 1, 1, 2 };
8835
yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.
Middle
, 1, -1, -2 };
8836
yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONUP, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.
Middle
, 1, 0, 0 };
8837
yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.
Middle
, 1, 1, 2 };
8838
yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.
Middle
, 1, -1, -2 };
System\Windows\Forms\ButtonTests.cs (6)
2645
yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.
Middle
, 1, 2, 3, 4) };
2649
yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.
Middle
, 1, 2, 3, 4) };
2697
yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.
Middle
, 1, 2, 3, 4), false };
2701
yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.
Middle
, 1, 2, 3, 4), false };
2801
yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.
Middle
, 1, 2, 3, 4), 0 };
2805
yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.
Middle
, 1, 2, 3, 4), 0 };
System\Windows\Forms\ControlTests.Methods.cs (18)
13393
yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.
Middle
, 1, 0, 0 };
13394
yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.
Middle
, 1, 1, 2 };
13395
yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.
Middle
, 1, -1, -2 };
13396
yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.
Middle
, 1, 0, 0 };
13397
yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.
Middle
, 1, 1, 2 };
13398
yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.
Middle
, 1, -1, -2 };
13400
yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.
Middle
, 2, 0, 0 };
13401
yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.
Middle
, 2, 1, 2 };
13402
yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.
Middle
, 2, -1, -2 };
13403
yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.
Middle
, 2, 0, 0 };
13404
yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.
Middle
, 2, 1, 2 };
13405
yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.
Middle
, 2, -1, -2 };
13763
yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONUP, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.
Middle
, 1, 0, 0 };
13764
yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.
Middle
, 1, 1, 2 };
13765
yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.
Middle
, 1, -1, -2 };
13766
yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONUP, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.
Middle
, 1, 0, 0 };
13767
yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.
Middle
, 1, 1, 2 };
13768
yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.
Middle
, 1, -1, -2 };
System\Windows\Forms\ControlTests.Properties.cs (2)
9262
[InlineData(0, byte.MaxValue, 0, 0, 0, MouseButtons.
Middle
)]
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\DataGridViewCellTests.cs (12)
5499
yield return new object[] { new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
5502
yield return new object[] { new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
5505
yield return new object[] { new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
5508
yield return new object[] { new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
5511
yield return new object[] { new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
5514
yield return new object[] { new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
5532
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
5535
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
5538
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
5541
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
5544
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
5547
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
System\Windows\Forms\DataGridViewHeaderCellTests.cs (36)
3813
yield return new object[] { new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
3816
yield return new object[] { new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
3819
yield return new object[] { new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
3822
yield return new object[] { new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
3825
yield return new object[] { new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
3828
yield return new object[] { new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
3846
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)), false };
3849
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)), false };
3852
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)), false };
3855
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)), false };
3858
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)), false };
3861
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)), false };
4109
yield return new object[] { new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
4112
yield return new object[] { new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
4115
yield return new object[] { new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
4118
yield return new object[] { new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
4121
yield return new object[] { new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
4124
yield return new object[] { new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
4142
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)), ButtonState.Normal };
4145
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)), ButtonState.Normal };
4148
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)), ButtonState.Normal };
4151
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)), ButtonState.Normal };
4154
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)), ButtonState.Normal };
4156
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)), ButtonState.Normal };
4449
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
4452
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
4455
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
4458
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
4461
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
4463
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)) };
4524
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)), expectedButtonState1 };
4527
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)), expectedButtonState1 };
4530
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)), expectedButtonState1 };
4533
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)), expectedButtonState1 };
4536
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)), expectedButtonState1 };
4538
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.
Middle
, 0, 0, 0, 0)), expectedButtonState1 };
System\Windows\Forms\RadioButtonTests.cs (6)
1050
yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.
Middle
, 1, 2, 3, 4) };
1054
yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.
Middle
, 1, 2, 3, 4) };
1103
yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.
Middle
, 1, 2, 3, 4), false };
1107
yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.
Middle
, 1, 2, 3, 4), false };
1206
yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.
Middle
, 1, 2, 3, 4) };
1210
yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.
Middle
, 1, 2, 3, 4) };
System\Windows\Forms\SplitterTests.cs (2)
1957
yield return new object[] { new MouseEventArgs(MouseButtons.
Middle
, 1, 2, 3, 4) };
1999
yield return new object[] { new MouseEventArgs(MouseButtons.
Middle
, 1, 2, 3, 4), false };
TextBoxBaseTests.cs (12)
7181
yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.
Middle
, 1, 0, 0 };
7182
yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.
Middle
, 1, 1, 2 };
7183
yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.
Middle
, 1, -1, -2 };
7184
yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.
Middle
, 1, 0, 0 };
7185
yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.
Middle
, 1, 1, 2 };
7186
yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.
Middle
, 1, -1, -2 };
7188
yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.
Middle
, 2, 0, 0 };
7189
yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.
Middle
, 2, 1, 2 };
7190
yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.
Middle
, 2, -1, -2 };
7191
yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.
Middle
, 2, 0, 0 };
7192
yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.
Middle
, 2, 1, 2 };
7193
yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.
Middle
, 2, -1, -2 };
System.Windows.Forms.UI.IntegrationTests (6)
Input\InputBuilder.cs (2)
86
MouseButtons.
Middle
=> MOUSE_EVENT_FLAGS.MOUSEEVENTF_MIDDLEDOWN,
108
MouseButtons.
Middle
=> MOUSE_EVENT_FLAGS.MOUSEEVENTF_MIDDLEUP,
Input\MouseSimulator.cs (4)
43
return ButtonDown(MouseButtons.
Middle
);
48
return ButtonUp(MouseButtons.
Middle
);
53
return ButtonClick(MouseButtons.
Middle
);
58
return ButtonDoubleClick(MouseButtons.
Middle
);