Results 1 to 4 of 4

Thread: Displaying special characters

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2004
    Posts
    4

    Displaying special characters

    so im using the following code (snippet):

    Dim Retext As String
    If num >= 39 And num <= 51 Then
    Retext = System.Convert.ToChar(&H2660)
    End If

    Return Retext

    to display the suits of cards for a poker simulation. This works just fine in Windows XP. When i run the executable, i can see the heart, spade, diamond, and clubs characters just fine.
    However, when i run the same executable in Windows 2000, all i get is a bold pipe character.

    Any reason why different versions of Windows would convert hex characters differently?

    thanks

  2. #2
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    That is .NET code, but doesn't really matter of this question (or maybe it DOES).

    have you tried checking Charmap (run-> charmap) and seeing if the character exists for it? Maybe the font is different.q
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2004
    Posts
    4
    ran the charmap, and it shows up. the charmap shows:

    U + 2660 : Black Spade Suit

    so it looks like it should be able to be displayed, but for some reason it is not. I'm completely lost.

  4. #4

    Thread Starter
    New Member
    Join Date
    Mar 2004
    Posts
    4
    nevermind. i must be an idiot.

    apparently, the default fone for lstBoxes is different between the 2 versions of windows, and the default font (SansSerif) in Windows2000 does not support those characters.

    changin the text to TimesNewRoman did the trick. now i just have to force my code to always display the text in that format, and im golden.

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