This document is archived and information here might be outdated. Recommended version. |
Occurs when the mouse is moved when this tool is active.
[Visual Basic .NET]
Public Sub OnMouseMove ( _
ByVal button As Integer, _
ByVal shift As Integer, _
ByVal x As Integer, _
ByVal y As Integer _
)
[C#]
public void OnMouseMove (
int button,
int shift,
int x,
int y
);
[C++]
HRESULT OnMouseMove(
long button,
long shift,
long x,
long y
);
[C++] Parameters button [in]
button is a parameter of type long shift [in]
shift is a parameter of type long x [in]
x is a parameter of type long y [in]
y is a parameter of type long
button specifies which mouse button was pressed while moving the mouse. The button argument is a bit field. Some, all, or none of the bits can be set indicating that some, all, or none of the mouse buttons are pressed. The values for button are as follows:
1 Left button
2 Right button
3 Left and Right buttons
4 Middle button
5 Left and Middle buttons
6 Right and Middle buttons
7 All buttons
Shift indicates whether the Shift key, Ctrl key, or Alt key is pressed when the mouse is moved. The Shift argument is a bit field. Some, all, or none of the bits can be set indicating that some, all, or none of the keys are pressed. The values for Shift are as follows:
0 No key pressed
1 Shift key pressed
2 Ctrl key pressed
3 Shift and Ctrl keys pressed
4 Alt key pressed
5 Shift and Alt keys pressed
6 Ctrl and Atl keys pressed
7 Shift, Ctrl, and Alt keys pressed
X is the X coordinate, in device units, of the mouse location.
Y is the Y coordinate, in device units, of the mouse location.
When implementing ITool to create a custom tool, write the code that performs the action when the mouse is moved when this tool is the active tool in the OnMouseMove method.