locked
All ONCLICK handlers should have an equivalent ONKEYPRESS handler RRS feed

  • Question

  • User1052662409 posted

    Hi All,

            On a button click I am doing work like below.

            

    Protected Sub btn_add_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_add.Click
            Try
                // do somthing
                End If
            Catch ex As Exception
                oLocalLogging.LogError((New System.Diagnostics.StackFrame()).GetMethod().Name, ex)
                Dim oDebug As New debug
                oDebug.get_Debug_message(ex)
                oDebug = Nothing
            End Try
        End Sub

    I want to do the same on ONKEYPRESS handler so that users which are unable to use a mouse, so use the keyboard instead.

    Need to add an equivalent keyboard event handler to help these users. As I am not much familiar with VB please suggest.

    Thanks

    Wednesday, January 17, 2018 9:48 AM

Answers

  • User-492460945 posted

    Hello demoninside9,

    Did you try using Generic Handler? which can be called on on key press event as well?

    Thanks

    Rajesh.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, January 17, 2018 10:43 AM