Click to See Complete Forum and Search --> : Displaying extended TrueType font characters


IngisKahn
December 6th, 1999, 11:39 AM
How do you display characters over 255? chrw(x) just outputs a question mark. I have a few unicode fonts, how can I use them?

Feng Yuan
December 17th, 1999, 03:20 PM
Create the logical font with the right charset, then either use ANSI or UNICODE form of TextOut calls. For example, if you choose arabic character set, you can use single byte calls or unicode call; if you choose chinese character set, you can use multibyte calls or unicode call.

nyt
May 24th, 2003, 05:33 AM
To embed UNICODE characters into your VB application, add a built-in component named "Microsoft Forms 2.0 Object Library" from Components Dialog Box. You can get Components dialog box by Pressing CTRL+T

This gives you 14 new controls in your toolbox, including TextBox, Label, CommandButton, ListBox, ComboBox, CheckBox, Radio Buttons and a few more. They seem to be like default VB controls but are different in working. These controls support UNICODE characters.

Here is the code for displaying UNICODE characters in a new TextBox control:

Controls to be placed on the Form:

Two VB's default Text Boxes from Toolbox and a CommandButton
One TextBox control from newly added Controls
The code below will give you the unicode versions of the number range you specify in the two text boxes.
ChrW(number) is the actual function that performs the conversion.

Try using the range from 1500 to 1600 to see Urdu characters in your TextBox

Instead of 1500 or any number Hexa codes may be used. e.g
chrw(&HFEB3) is Arabic word.