method ChartView.ScrollOnCursor (X as OLE_XPOS_PIXELS, Y as OLE_YPOS_PIXELS)
Scrolls the chart as the cursor indicates.

TypeDescription
X as OLE_XPOS_PIXELS A long expression that specifies the screen x-coordinate of the cursor, -1 for the current cursor position
Y as OLE_YPOS_PIXELS A long expression that specifies the screen y-coordinate of the cursor, -1 for the current cursor position
ScrollOnCursor method scrolls the chart based on the position of the cursor. So, if the cursor is on the top of the chart, the control get scrolled up, else if the cursor is on the bottom side of the chart, the chart gets scrolled down, and so on. The BorderWidth and BorderHeight properties specifies the width and height of the borders of the chart. For instance, you can use the ScrollOnCursor method to scroll during ole drag and drop operation, as you can see in the next sample. The ScrollOnCursor method scrolls the chart pixel by pixel, so you can call several times, so multiple pixels are scrolled once. Use the BeginUpdate/EndUpdate methods to maintain  performance while calling the ScrollOnCursor several times. Use the ScrollPos property to programmatically scroll the chart.

The following C# sample scrolls the chart if the cursor is on the borders of the chart, while drag and drop:

private void chartview1_DragOver(object sender, DragEventArgs e)
{
    chartview1.BeginUpdate();
    for ( int i = 0; i < 4; i++ )
        chartview1.ScrollOnCursor();
    chartview1.EndUpdate();
    e.Effect = DragDropEffects.None;
    exontrol.EXORGCHARTLib.Node spNode = chartview1.get_NodeFromPoint(-1, -1);
    if (spNode != null)
        if ( spNode.Key != e.Data.GetData(DataFormats.Text).ToString() )
            e.Effect = e.AllowedEffect;
}

The following VB.NET sample scrolls the chart if the cursor is on the borders of the chart, while drag and drop:

Private Sub Chartview1_DragOver(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles Chartview1.DragOver
    With Chartview1
        .BeginUpdate()
        For i As Integer = 1 To 4
            .ScrollOnCursor()
        Next
        .EndUpdate()
    End With
    e.Effect = DragDropEffects.None
    Dim spNode As exontrol.EXORGCHARTLib.Node = Chartview1.get_NodeFromPoint(-1, -1)
    If Not spNode Is Nothing Then
        If spNode.Key <> e.Data.GetData(DataFormats.Text).ToString() Then
            e.Effect = e.AllowedEffect
        End If
    End If
End Sub