Reputation: 7910
hello
Is it possible to get character character code in Visual Basic 2008
and to get character from character code ( Without form1_keyDown or KeyUp)?.
What i need is two functions
, first to get character code
of a character
, and second to get character
from character code
.
thank you.
Upvotes: 1
Views: 15667
Reputation: 545923
From Unicode code point (not, strictly speaking, ASCII) to character: Chr
and ChrW
.
Inverse direction: Asc
and AscW
.
To get the character representation in specific encodings you need to use the methods of the System.Text.Encoding
class.
Upvotes: 10
Reputation: 7236
From MSDN:
Public Function Chr(ByVal CharCode As Integer) As Char
Public Function ChrW(ByVal CharCode As Integer) As Char
Upvotes: 5