property CalendarCombo.IndexFromPoint (X as OLE_XPOS_PIXELS, Y as OLE_YPOS_PIXELS) as Long
Retrieves the index of the date's element from the point.

TypeDescription
X as OLE_XPOS_PIXELS A long expression that indicates the x-coordinate of the point.
Y as OLE_YPOS_PIXELS A long expression that indicates the y-coordinate of the point.
Long A long expression that indicates the index of the date's element from the point.

The IndexFromPoint property retrieve the index of the element from the cursor. If the x and y parameters are -1, the IndexFromPoint property retrieves the index of the element from the current cursor position. Use the FocusIndex property to specify the index of the date's element that gets the focus. Use the Caption property to retrieve the caption of the date's element.

The following VB sample prints the date's element being double clicked:

Private Sub CalendarCombo1_DblClick(Shift As Integer, X As Single, Y As Single)
    With CalendarCombo1
        h = .IndexFromPoint(-1, -1)
        Debug.Print .Caption(h)
    End With
End Sub

The following VB.NET sample prints the date's element being double clicked:

Private Sub AxCalendarCombo1_DblClick(ByVal sender As Object, ByVal e As AxEXCALENDARLib._ICalendarComboEvents_DblClickEvent) Handles AxCalendarCombo1.DblClick
    With AxCalendarCombo1
        System.Diagnostics.Debug.Print(.get_Caption(.get_IndexFromPoint(e.x, e.y)))
    End With
End Sub

The following C# sample prints the date's element being double clicked:

private void axCalendarCombo1_DblClick(object sender, AxEXCALENDARLib._ICalendarComboEvents_DblClickEvent e)
{
	System.Diagnostics.Debug.Print(axCalendarCombo1.get_Caption(axCalendarCombo1.get_IndexFromPoint(e.x, e.y)));
}

The following C++ sample prints the date's element being double clicked:

void OnDblClickCalendarcombo1(short Shift, long X, long Y) 
{
	long i = m_calendarcombo.GetIndexFromPoint( X, Y );
	OutputDebugString( m_calendarcombo.GetCaption( COleVariant( i ) ) );
}

The following VFP sample prints the date's element being double clicked:

*** ActiveX Control Event ***
LPARAMETERS shift, x, y

with thisform.CalendarCombo1
	?.Caption(.IndexFromPoint(x,y))
endwith