CursorMouseDown, CursorMouseMove, CursorMouseUp Events
Syntax
Sub ControlName_CursorMouseDown( Button As Integer, Shift As Integer, XPos As Variant, YPos As Variant, CursorIndex As Integer, CursorPart As CWCursorParts)
Sub ControlName_CursorMouseMove( Button As Integer, Shift As Integer, XPos As Variant, YPos As Variant, CursorIndex As Integer, CursorPart As CWCursorParts)
Sub ControlName_CursorMouseUp( Button As Integer, Shift As Integer, XPos As Variant, YPos As Variant, CursorIndex As Integer, CursorPart As CWCursorParts)
Applies To
Purpose
CursorMouseDown is generated when you click the mouse on a cursor.
CursorMouseMove is generated when you move the mouse over a cursor.
CursorMouseUp is generated when you release the mouse over a cursor.
Remarks
These events generate only if CWGraph.TrackMode is set to cwGTrackAllEvents. If the TrackMode property is set to cwGTrackDragCursor, the CursorChange event is generated.
In Visual Basic,` use the following constants with the Button and Shift parameters:
vbLeftButton | 1 | Left button is pressed |
vbRightButton | 2 | Right button is pressed |
vbMiddleButton | 4 | Middle button is pressed |
vbShiftMask | 1 | <Shift> key is pressed |
vbCtrlMask | 2 | <Ctrl> key is pressed |
vbAltMask | 4 | <Alt> key is pressed |
Parameters
Button As Integer
State of the mouse buttons. The Button argument can be any combination of the following values: 1 for the left button, 2 for the right button, or 4 for the middle button. For example, if both the left and right mouse buttons are pressed, the Button argument is 3 (1 + 2). In the CursorMouseUp event, the Button argument corresponds to the state of the buttons after the triggering button is released.
Shift As Integer
State of the <SHIFT> , <CTRL> , and <ALT> keys when the button specified in the Button argument is pressed, released, or moved. The Shift argument is a bit field with the least-significant bits corresponding to the <SHIFT> key (bit 0), the <CTRL> key (bit 1), and the <ALT> key (bit 2 ). Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed.
XPos As Variant
X position of the cursor.
YPos As Variant
Y position of the cursor.
CursorIndex As Integer
Index of the cursor (zero-based).
CursorPart As CWCursorParts
Part of the cursor on which the event occurred.