

| Type | Description | |||
| X as OLE_XPOS_PIXELS | A single that specifies the current X location of the mouse pointer. The x values is always expressed in client 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 client coordinates. | |||
| Date | A Date expression that indicates the date from the cursor or 0 if no date found. | 
The DateFromPoint property retrieves the value based on the X and Y parameters as follows:
The following VB sample displays the date from the cursor:
Private Sub G2antt1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    With G2antt1.Chart
        Dim d As Date
        d = .DateFromPoint(X / Screen.TwipsPerPixelX, Y / Screen.TwipsPerPixelY)
        Debug.Print .FormatDate(d, "<%m%>/<%d%>/<%yyyy%>")
    End With
End Sub
The following C++ sample displays the date from the point:
void OnMouseMoveG2antt1(short Button, short Shift, long X, long Y) 
{
	CChart chart = m_g2antt.GetChart();
	DATE d = chart.GetDateFromPoint( X, Y );
	CString strFormat = chart.GetFormatDate( d, "<%m%>/<%d%>/<%yyyy%>" );
	OutputDebugString( strFormat );
}
The following VB.NET sample displays the date from the point:
Private Sub AxG2antt1_MouseMoveEvent(ByVal sender As Object, ByVal e As AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent) Handles AxG2antt1.MouseMoveEvent
    With AxG2antt1.Chart
        Dim d As Date
        d = .DateFromPoint(e.x, e.y)
        Debug.Write(.FormatDate(d, "<%m%>/<%d%>/<%yyyy%>"))
    End With
End Sub
The following C# sample displays the date from the point:
private void axG2antt1_MouseMoveEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent e)
{
	DateTime d = axG2antt1.Chart.get_DateFromPoint(e.x, e.y);
	System.Diagnostics.Debug.Write(axG2antt1.Chart.get_FormatDate(d, "<%m%>/<%d%>/<%yyyy%>"));
}
The following VFP sample displays the date from the point:
*** ActiveX Control Event *** LPARAMETERS button, shift, x, y with thisform.G2antt1.Chart d = .DateFromPoint(x,y) wait window nowait .FormatDate(d, "<%m%>/<%d%>/<%yyyy%>" ) endwith