在C#中显示符号 [英] Displaying a symbol in c#

查看:187
本文介绍了在C#中显示符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在控件中显示符号►"时遇到困难:

当字符串打印到屏幕上时,我无法正确显示箭头.

我试过了:

Hi All,

I am experiencing difficulty in displaying a symbol "►" in a control:

I cannot get the arrow to display correctly when the string is printed to the screen.

I have tried:

legendWindow1.Add(count.ToString() + "\u25C4");







and

legendWindow1.Add(count.ToString() +  "►"\);



两者都只是在符号上产生一个正方形.我已经通过add方法跟踪了字符串,并且输入的字符串不正确,因此在这一行中我无法解决.

预先感谢George



both of which just produce a square apposed to the symbol. I have followed the string through the add method and it is entering that incorrectly so its something in this line that i cant work out.

Thanks in advance George

推荐答案

将控件的字体设置为任何可用的unicode字体,例如"Arial Unicode MS"
Set control''s font to any unicode font available, like "Arial Unicode MS"


"16"实心前进箭头. "16"是所需符号的已存在的ASCII码.您可以使用它
"16" Solid Forward Arrow. "16" is the exented ascii code for the symbol that you want. You can use it
Convert.ToChar(16)

这将为您提供该符号.但是当然您的页面必须支持扩展的ascii格式

http://www.susanminor.org/forums/showthread.php?734-扩展的ASCII显示字符 [ ^ ]

This will give you that symbol. But of course your page must be support extended ascii format

http://www.susanminor.org/forums/showthread.php?734-Extended-ASCII-Display-Characters[^]


这篇关于在C#中显示符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆