Lompat ke konten Lompat ke sidebar Lompat ke footer

VB.Net KeyCode

VB NET Using Key Code

How To Use KeyCode On KeyDown To Check Which Key Is Pressed Like  VB.Net KeyCode

In This VB.Net Tutorial  We Will See How To Use KeyCode On KeyDown To Check Which Key Is Pressed Like ENTER or SPACE In Visual Basic.Net Programming Language And Visual Studio Editor.


Project Source Code:

Public Class Form_Key_Code

    Private Sub Form_Key_Code_KeyDown(sender As Object, e As KeyEventArgs) Handles MyBase.KeyDown

        Dim code As String
        code = e.KeyCode

        Select Case code

            Case 32
                Label1.Text = "Spacebar"

            Case 13
                Label1.Text = "Enter"

        End Select

    End Sub
End Class
      
///////////////OUTPUT:

How To Use KeyCode On KeyDown To Check Which Key Is Pressed Like  VB.Net KeyCode

How To Use KeyCode On KeyDown To Check Which Key Is Pressed Like  VB.Net KeyCode




Posting Komentar untuk "VB.Net KeyCode"