开发者

Name of backquote character in VB

In System.Windows.Forms.Keys, what is the name of the backquote (`) character? Is backquote not its proper name, o开发者_开发技巧r is it just a quirk of VS?

Or, otherwise, what is its numeric value?


The KeyValue for the character is 223. To check, you can just handle a textbox's keydown event like this:

Private Sub TextBox1_KeyDown(sender As System.Object, e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
        MessageBox.Show(e.KeyValue.ToString())
End Sub

and press the (`) key. If you want to compare the KeyData, it's under Keys.Oem8.

Edit - As noted in the comments, the KeyValue may change across systems. The enumeration Keys.Oem8 should handle this, so this would be the preferred method of checking if the key is pressed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜