Guyz please help me on how to know the value of the specific character when i pressed the keyboard, a messagebox will pop out and tell's value of the character that I pressed. For example character a=65 "not sure if it's the real value of a" heres my code..

Private Sub frmMain_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress

        MsgBox(e.KeyChar)

Recommended Answers

All 2 Replies

Asc(e.KeyChar) - Return the ascii of key character.

commented: great! +1

thanx a lot "Adatapost" ^_^

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.