- Private Sub fpSpread1_PreviewKeyDown(ByVal sender As Object, ByVal e As PreviewKeyDownEventArgs)
- If e.Control AndAlso e.KeyCode = Keys.V Then
- Dim bitmap As Bitmap = TryCast(Clipboard.GetData(DataFormats.Bitmap), Bitmap)
- Dim imgType As New FarPoint.Win.Spread.CellType.ImageCellType()
- imgType.Style = FarPoint.Win.RenderStyle.Stretch
- Me.FpSpread1.ActiveSheet.ActiveCell.CellType = imgType
- Me.FpSpread1.ActiveSheet.ActiveCell.Value = bitmap
- 'Me.FpSpread1.ActiveSheet.ActiveColumn.Width = 200
- 'Me.FpSpread1.ActiveSheet.ActiveRow.Height = 200
- End If
- If e.KeyCode = Keys.Delete Then
- Dim cellType As New FarPoint.Win.Spread.CellType.EmptyCellType()
- Me.FpSpread1.ActiveSheet.ActiveCell.CellType = cellType
- Me.FpSpread1.ActiveSheet.ActiveCell.Value = ""
- End If
- End Sub
复制代码
我这边 Ctrl+V 复制图片到单元格,用 FpSpread1_Sheet1.Cells(i, j).Value 来取的,但是取不到数据 |