回复 3楼刘君的帖子
你是不是想在编辑状态下,触发KeyDown事件呢?
你可以加如下两个事件,这个编辑状态下就可以触发KeyDown事件了。
Private Sub spd_Ct_EditModeOff(sender As Object, e As EventArgs) Handles spd_ct.EditModeOff
'Keyイベントのマッピングを解除します
Dim KeyDownHandler As KeyEventHandler = AddressOf spd_ct_KeyDownEvent
RemoveHandler spd_ct.EditingControl.KeyDown, KeyDownHandler
End Sub
Private Sub spd_Ct_EditModeOn(sender As Object, e As EventArgs) Handles spd_ct.EditModeOn
'Keyイベントをマッピングします
Dim KeyDownHandler As KeyEventHandler = AddressOf spd_ct_KeyDownEvent
AddHandler spd_ct.EditingControl.KeyDown, KeyDownHandler
End Sub |