How to intercept the TAB key press to prevent standard focus change in C#

后端 未结 5 776
伪装坚强ぢ
伪装坚强ぢ 2021-01-19 04:36

Normally when pressing the TAB key you change the focus to the next control in the given tab order. I would like to prevent that and have the TAB key do something else. In m

5条回答
  •  攒了一身酷
    2021-01-19 05:30

    Override ProcessDialogKey or ProcessTabKey on your Form and do the logic you want depending on which control is focused.

提交回复
热议问题