这样能用左键进行拖拽数据了
Private Sub FpSpread1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles FpSpread1.MouseDown
cr = FpSpread1.ActiveSheet.GetSelection(0)
Dim hitInfo As FarPoint.Win.Spread.HitTestInformation = FpSpread1.HitTest(e.X, e.Y)
If Not hitInfo.ViewportInfo Is Nothing Then
If FpSpread1.ActiveSheet.ActiveRowIndex = hitInfo.ViewportInfo.Row AndAlso FpSpread1.ActiveSheet.ActiveColumnIndex = hitInfo.ViewportInfo.Column Then
' ドラッグ アンド ドロップ操作の効果を指定します。
If e.Button = Windows.Forms.MouseButtons.Left Then
Try
FpSpread1.DoDragDrop(s, DragDropEffects.Copy Or DragDropEffects.Move)
Catch Exception As Exception
End Try
End If
End If
End If
End Sub |