Lompat ke konten Lompat ke sidebar Lompat ke footer

VB.Net KeyChar

VBNET Using Key Char

How To Use KeyChar On KeyPress To Check Which Key Is Pressed Like  VB.Net KeyChar

In This VB.Net Tutorial  We Will See How To Use KeyChar On KeyPress 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_char


    Private Sub Form_key_char_KeyPress(sender As Object, e As KeyPressEventArgs) Handles MyBase.KeyPress

        Dim ch As String
        ch = e.KeyChar

        Label1.Text = ch

        Select Case ch

            Case Convert.ToChar(Keys.Enter)
                Label1.Text = "Enter"

            Case Convert.ToChar(Keys.Space)
                Label1.Text = "Space"

        End Select

    End Sub
End Class
      
///////////////OUTPUT:
How To Use KeyChar On KeyPress To Check Which Key Is Pressed Like  VB.Net KeyChar

How To Use KeyChar On KeyPress To Check Which Key Is Pressed Like  VB.Net KeyChar




Posting Komentar untuk "VB.Net KeyChar"