Ascii code in VB6
Hi, I need to write a function to convert characters into their binary equivalent. Which function do we use to get the ascii code of a character - e. g an 'A' is 65 and and which function do we use to return the character associated with an Ascii code eg 65 will return an 'A'.
Hi,
I need to write a function to convert characters into their binary equivalent.
Which function do we use to get the ascii code of a character - e.g an 'A' is 65 and and which function do we use to return the character associated with an Ascii code eg 65 will return an 'A'.
In Foxpro we use the fuctions ASC() and CHR().
I am new to VB6
Thanks
*****
I need to write a function to convert characters into their binary equivalent.
Which function do we use to get the ascii code of a character - e.g an 'A' is 65 and and which function do we use to return the character associated with an Ascii code eg 65 will return an 'A'.
In Foxpro we use the fuctions ASC() and CHR().
I am new to VB6
Thanks
*****
Participate on our website and join the conversation
This topic is archived. New comments cannot be posted and votes cannot be cast.
Responses to this topic
Asc, AscW Functions.
Chr, ChrW Functions.
Something like this (for one character and ascii code):
Character to ascii:
Dim asciiInt As Integer
asciiInt = Asc(CharacterBox.Text)
AsciiLabel.Text = asciiInt.ToString
Ascii to character code:
Dim asciiChar As Char
asciiChar = Chr(AsciiBox.Text)
CharacterLabel.Text = asciiChar.ToString
Chr, ChrW Functions.
Something like this (for one character and ascii code):
Character to ascii:
Dim asciiInt As Integer
asciiInt = Asc(CharacterBox.Text)
AsciiLabel.Text = asciiInt.ToString
Ascii to character code:
Dim asciiChar As Char
asciiChar = Chr(AsciiBox.Text)
CharacterLabel.Text = asciiChar.ToString
thanks wilhemus