如何使文本框textBox不回显

xuanji79 2003-08-15 05:18:05
想做一个密码输入框,但不知道是不是用textbox就行,但不知道,如何使textbox不回显.请各位大哥帮帮小弟了.
...全文
73 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
大户翁 2003-08-15
  • 打赏
  • 举报
回复
1。设置textbox的字体颜色=背景色
2。
private void textBox4_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
{
if (e.Shift&&e.KeyValue==37)
{
textBox4.SelectionStart=0;
}
if(e.Shift&&e.KeyValue==39)
{
textBox4.SelectionStart=textBox4.Text.Length;
}

}
3。
private void textBox4_MouseDown(object sender,
ystem.Windows.Forms.MouseEventArgs e)
{
textBox4.SelectionLength=0;
}

参考!!!!!!
kuangren 2003-08-15
  • 打赏
  • 举报
回复
passwordchar输入你要的×※……%%等等
甴曱 2003-08-15
  • 打赏
  • 举报
回复
设置属性:
PasswordChar
你可以在里面输入*等。
xuanji79 2003-08-15
  • 打赏
  • 举报
回复
可我怎么找不到textbox的Textmode属性呀,,,,
Lovest 2003-08-15
  • 打赏
  • 举报
回复
将textbox的的Textmode属性设为:password即可。
xuanji79 2003-08-15
  • 打赏
  • 举报
回复
我享用c#做.
zhiks 2003-08-15
  • 打赏
  • 举报
回复
<asp:textbox id=".." runat="server" textmode="password"/>
jjcccc 2003-08-15
  • 打赏
  • 举报
回复
将textbox的的Textmode属性设为:password即可。

110,534

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧