HitTest Method (MonthView Control) Example

This example uses the HitTest method to display the date in a label control as the mouse passes over it. To try the example, place MonthView and Label controls on a form. Then paste the following code into the Declarations section.

Private Sub MonthView1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
   Dim iResult As Integer
   Dim dtMyDate As Date
   iResult = MonthView1.HitTest(x, y, dtMyDate)
   Label1.Caption = dtMyDate
End Sub