How to intercept capture TAB key in WinForms application?

前端 未结 4 1781
孤城傲影
孤城傲影 2021-01-17 15:00

I\'m trying to capture the Tab key in a Windows Forms application and do a custom action when it is pressed.

I have a Form with several listViews and button

4条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-17 15:52

    Private Sub form1_KeyDown(.... ) Handles Me.KeyDown
        If e.KeyCode = Keys.Enter Then
            SendKeys.Send("{tab}")
        End If
    End Sub
    

提交回复
热议问题