![]() | Type | Description | ||
| Button as Integer | An integer that corresponds to the state of the mouse buttons in which a bit is set if the button is down. | |||
| Shift as Integer | An integer that corresponds to the state of the SHIFT, CTRL, and ALT keys. | |||
| X as OLE_XPOS_PIXELS | A single that specifies the current X location of the mouse pointer. The x values is always expressed in container coordinates | |||
| Y as OLE_YPOS_PIXELS | A single that specifies the current Y location of the mouse pointer. The y values is always expressed in container coordinates |
The following sample displays the button from cursor:
Private Sub Calc1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
With Calc1
Debug.Print .ButtonFromPoint(X / Screen.TwipsPerPixelX, Y / Screen.TwipsPerPixelY)
End With
End Sub