Saturday, April 13, 2013

How to detect an ENTER click in VB.NET!

This can be easily be used to detect an enter click in VB.NET! It only takes a couple lines of code. Here is how you can do it.


Protected Overrides Function ProcessDialogKey(ByVal keyData As System.Windows.Forms.Keys) As Boolean
        Select Case (keyData)
            Case Keys.Enter
                ButtonX4.PerformClick()
                Return True

        End Select
        Return MyBase.ProcessDialogKey(keyData)
    End Function

This is a real value tutorial when you want to learn visual basic coding. Next Tutorial coming soon!

No comments:

Post a Comment