![]() | Type | Description | ||
| X as OLE_XPOS_PIXELS | A single expression that indicates the X position in client coordinate | |||
| Y as OLE_YPOS_PIXELS | A single expression that indicates the Y position in client coordinate | |||
| Date | 0 or a DATE expression that indicates the date from point (X,Y) |
Use the DateFromPoint property to get the date from the cursor.
The following sample shows how to print the date over the cursor:
Private Sub Calendar1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Dim d As Date d = Calendar1.DateFromPoint(X / Screen.TwipsPerPixelX, Y / Screen.TwipsPerPixelY) If d <> 0 Then Debug.Print FormatDateTime(d) End If End Sub