IMouseDevice Interface

An interface that provides low-level mouse operations.

C# Syntax

                        
                            public interface IMouseDevice 
Public Methods
 NameDescription
Public MethodButtonDown

Presses the specified mouse button at the specified point on the screen

C# Syntax

                        public void ButtonDown( 
   Point point,
   MouseButton button
)

Parameters

point
The System.Drawing.Point where the mouse button is pressed.
button
Optional. The mouse button to press. Possible Values: MouseButton. Default = MouseButton.Left.
Public MethodButtonUp

Releases the specified mouse button at the specified point on the screen.

 C# Syntax

                        public void ButtonUp( 
   Point point,
   MouseButton button
)

Parameters

point
The System.Drawing.Point where the mouse button is released.
button
Optional. The mouse button to release. Possible Values: MouseButton. Default = MouseButton.Left.
Public MethodClick

Moves the mouse to the specified point on the screen and clicks the specified mouse button.  

C# Syntax

                        public void Click( 
   Point point,
   MouseButton button
)

Parameters

point
The System.Drawing.Point on the screen to place the mouse pointer.
button
Optional. The mouse button that performs the click. Possible Values: MouseButton. Default = MouseButton.Left.
Public MethodDoubleClick

Moves the mouse to the specified point on the screen and double-clicks the specified mouse button.  

C# Syntax

                        public void DoubleClick( 
   Point point,
   MouseButton button
)

Parameters

point
The System.Drawing.Point on the screen to place the mouse pointer.
button
Optional. The mouse button that performs the double-click. Possible Values: MouseButton. Default = MouseButton.Left.
Public MethodDragAndDrop

Drags the mouse from and to the specified points while the specified mouse button is pressed, and then releases the mouse button.  

C# Syntax

                        public void DragAndDrop( 
   Point fromPoint,
   Point toPoint,
   MouseButton button
)

Parameters

fromPoint
The System.Drawing.Point from which to perform the drag and drop operation.
toPoint
The System.Drawing.Point where the drag ends and the mouse button is released.
button
Optional. The mouse button that is pressed during the drag operation. Possible Values: MouseButton. Default = MouseButton.Left.
Public MethodMove

Moves the mouse to the specified point on the screen.  

C# Syntax

                        public void Move( 
   Point point
)

Parameters

point
The System.Drawing.Point on the screen to place the mouse pointer.