回复 1楼miyaminn的帖子
请问 _vas_Sheet_0这个类是 FpSpread还是?
Spread 7.0 没有特殊写法,并且我通过您的代码在 8.0 中测试也没有问题,这段代码是禁止 Up 键动作的:
- Dim whenAncestorOfFocused As InputMap = FpSpread1.GetInputMap(InputMapMode.WhenAncestorOfFocused)
- Dim whenFocused As InputMap = FpSpread1.GetInputMap(InputMapMode.WhenFocused)
- whenAncestorOfFocused.Put(New Keystroke(Keys.Up, Keys.None), SpreadActions.None)
- whenFocused.Put(New Keystroke(Keys.Up, Keys.None), SpreadActions.None)
复制代码
以下这段代码用于控制 Shift+Up 键盘动作:
- Dim im As New FarPoint.Win.Spread.InputMap
- im = FpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenFocused)
- im.Put(New FarPoint.Win.Spread.Keystroke(Keys.Up, Keys.Shift), FarPoint.Win.Spread.SpreadActions.None)
- im = FpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused)
- im.Put(New FarPoint.Win.Spread.Keystroke(Keys.Up, Keys.Shift), FarPoint.Win.Spread.SpreadActions.None)
复制代码
谢谢 |