NUnitForms Class Library

MouseController.Press Method (MouseButtons)

Simulate pressing the mouse button(s).

[Visual Basic]
Overloads Public Sub Press( _
   ByVal buttons As MouseButtons _
)
[C#]
public void Press(
   MouseButtons buttons
);

Parameters

buttons
A bitwise combination of the MouseButtons enumeration values.

Remarks

Press positions the mouse over the control under test and then simulates pressing the specified buttons.

Exceptions

Exception TypeCondition
NotSupportedException When buttons contains MouseButtons.XButton1 or MouseButtons.XButton2 and the installed mouse does have 4 or 5 buttons, respectively.

See Also

MouseController Class | NUnit.Extensions.Forms Namespace | MouseController.Press Overload List