CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 1999
    Posts
    7

    Displaying extended TrueType font characters

    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?


  2. #2
    Join Date
    Oct 1999
    Location
    WA
    Posts
    2,393

    Re: Displaying extended TrueType font characters

    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.


  3. #3
    Join Date
    May 2003
    Location
    Mardan
    Posts
    1

    Unicodes in Textbox

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured