Wingdings font: some characters are not displayed correctly

Posted on 2011-10-11
Last Modified: 2012-06-21
I create a form with a label having font Wingdings, and programmatically set the text to ChrW(&H8B) . According to Charmap, 0x8B is zero in a black circle. However, on the form the symbol does not show up. The same happens with 0x8C, but then 8D shows up correctly, then 0x8E again does not... It's the same in Windows XP and Windows 7, in VB6 and VB.Net 2010. Why these characters don't work?
Question by:Vadim Rapp
    LVL 40

    Accepted Solution

    Although the documentation tells that ChrW is the preferred way, I have found that for some fonts it does not work well. Use the standard Chr and it should work.
    LVL 16

    Expert Comment

    When I try keying in values using the keypad (using <Alt> keystrokes), I'm getting different results than when using ChrW.  And I can't find any pattern to the mismatched character mapping.

    However, Chr$ works just find.
    LVL 40

    Expert Comment

    by:Jacques Bourgeois (James Burger)
    According to the documentation, Chr takes the environment (Control Panel) into consideration, while ChrW goes straight to the Unicode value. The problem probably comes from there somewhere.
    LVL 40

    Author Closing Comment

    by:Vadim Rapp
    The problem in the real application was in taking the value from the SQL Server database (field nchar) via recordset, and putting it on MSDataReport, component of VB6. So the following code had this problem:

    in SQL:
    select myfield from mytable....
    in VB:
    report.section.control = recordset.field("myfield")

    and it was resolved by this modification:

    in SQL:
    select unicode(myfield) from my table...
    in VB:

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Article by: Martin
    Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
    New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
    This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
    The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now