Type | Description | |||
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 |
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