property Chart.MarkNowDelay as Double
Specifies the delay to show the current time in the chart.

   Double A numeric expression that indicates the delay to display the date time when using the MarkNowColor property. The negative value of the MarkNowDelay property is added to the date-time to indicate the new time to be represented on the chart instead. The value could be 1 which indicates 1 day, 1/24 which indicates 1 hour, and 1/24/60 indicates 1 minute, and so on  
By default the MarkNowDelay property is 0, which indicates that the current date-time or specified date-time ( MarkNow property ) is marked. For instance, if the MarkNowDelay property is 1, the date time to be highlighted is the current date time minus 1 day. The 1/24 (0.04167) indicates 1 hour, and 1/24/60 (00069444) indicates 1 minute, and so on. You can use the MarkNowDelay to specify a different point for your date time. You can use the MarkNow property to indicate a custom date to be shown instead the current date-time.

The following VB sample specifies a new starting point for marking the date time:

Private Sub G2antt1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    With G2antt1.Chart
        Dim d As Double
        d = .DateFromPoint(-1, -1)
        If (d = 0) Then
            .MarkNowDelay = 0
            .MarkNowDelay = (.MarkNow + .MarkNowDelay) - d
        End If
    End With
End Sub

Once you click a date within the chart, the vertical line will be show at your clicked position, and if the MarkNow property is Empty ( by default ), the counting will start from your clicked position.

Send comments on this topic.
1999-2018 Exontrol.COM, Software. All rights reserved.