Detecting the user pressing F10 in WPF

前端 未结 4 1669
迷失自我
迷失自我 2021-01-03 22:40

My WPF application has behaviour triggered by the functions keys (F1-F12).

My code is along these lines:

private void Window_Ke         


        
4条回答
  •  醉梦人生
    2021-01-03 23:09

    This worked for me, for F1

    Private Sub Window_KeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown
        If (e.Key = Key.F1) Then
            ShowHelp()
        End If
    End Sub
    

提交回复
热议问题