回复 4楼iceman的帖子
Private Sub FpSpread1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles FpSpread1.KeyDown
If FpSpread1.EditMode = False Then
Dim im, im1 As FarPoint.Win.Spread.InputMap
im1 = FpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenFocused)
im = FpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused)
im.Put(New FarPoint.Win.Spread.Keystroke(Keys.F4, Keys.None), FarPoint.Win.Spread.SpreadActions.None)
im1.Put(New FarPoint.Win.Spread.Keystroke(Keys.F4, Keys.None), FarPoint.Win.Spread.SpreadActions.None)
End If
End Sub
以上是我写的测试代码,可是这样写后当EditMode = True的时候,F2,F3,F4就没有响应了。
要怎么封装好呢?求教,急急急!!! |