C Sharp stx and etx characters visible

  • Thread starter Thread starter FrankvdHorst
  • Start date Start date
F

FrankvdHorst

Hallo,
In an application that I'm creating I want to display ☻ and ♥ in a
standard textbox. In this message they are displayed correctly. But
when I'm programming in Visual Studio my textbox displays a square. How
can i solve this minor problem.
PS
I tried different fonts including Lucinda Console, but i still see
squares or pipes like ( | )

Please give me a hint

Frank van der Horst
Netherlands
 
Frank,

I assume you used dingbats or something like that to show those symbols.
For a textbox, you won't really be able to show this, since the font doesn't
have actual characters (you are limited to one font).

You will either have to custom paint the text, or use something else,
like a webbrowser control or rich text box which you can use to display text
in more than one font.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Hallo,
In an application that I'm creating I want to display ? and ? in a
standard textbox. In this message they are displayed correctly. But
when I'm programming in Visual Studio my textbox displays a square. How
can i solve this minor problem.
PS
I tried different fonts including Lucinda Console, but i still see
squares or pipes like ( | )

Please give me a hint

Frank van der Horst
Netherlands
 
[displaying smiley and heart symbol]

If you're using the low character values (the actual STX and ETX
values in ASCII), they won't render correctly because they are control
codes - even though I remember that MS-DOS used to display symbols for
some of them.

I think you should be using the Unicode characters '\u263b' (black
smiling face) and '\u2665' (black hearts suit).

Eq.
 
Back
Top