Mar*_*vez 50
使用Unicode字符'BLACK CIRCLE'(U + 25CF) http://www.fileformat.info/info/unicode/char/25CF/index.htm
剪切和粘贴:●
Was*_*abi 15
我也想知道如何将它干净地存储在一个变量中.正如使用
char c = '•';
Run Code Online (Sandbox Code Playgroud)
是不是很好的做法(我猜).我发现了以下将它存储在变量中的方法
char c = (char)0x2022;// or 0x25cf depending on the one you choose
Run Code Online (Sandbox Code Playgroud)
甚至更清洁
char c = '\u2022';// or "\u25cf"
Run Code Online (Sandbox Code Playgroud)
https://msdn.microsoft.com/en-us/library/aa664669%28v=vs.71%29.aspx
字符串相同
string s = "\u2022";
Run Code Online (Sandbox Code Playgroud)
https://msdn.microsoft.com/en-us/library/362314fe.aspx
小智 10
使用此Unicode黑色圆圈的另一种解决方案>>
Start >> All Programs >> Accessories >> System Tools >> Character Map
Run Code Online (Sandbox Code Playgroud)
然后选择Arial font并选择Black circle复制它并将其粘贴到PasswordChar文本框的属性中.
而已....
小智 5
以下是实现此目的的一些不同方法.选一个适合你的
在"Tahoma"和"Times new Roman"这样的字体中,这个称为"黑色圆圈"的常用密码字符"●"具有unicode值0x25CF.使用值0x25CF设置PasswordChar属性或复制粘贴实际字符本身.
如果要在默认情况下显示黑色圆圈,则启用视觉样式,默认情况下应将默认密码字符从"*"替换为"●",而不考虑字体.
另一种方法是在TextBox上使用'Wingdings 2'字体,并将密码字符设置为0x97.即使应用程序未单独编码,这也应该有效.请参阅charMap.exe以更好地了解支持的不同字体和字符.