1
2
3
4
5
6
7
|
//三種都是清空
this
.textBox1.PasswordChar =
new
char
();
this
.textBox1.PasswordChar =
'\0'
;
this
.textBox1.PasswordChar =
default
(
char
);
|
1
2
3
4
5
|
把TextBox的TextMode屬性改回 默認的SingleLine就行了啊。
要設為密碼屬性的代碼:TextBox1.TextMode = TextBoxMode.Password
要取消密碼屬性的代碼:TextBox1.TextMode = TextBoxMode.SingLine(SingLine為默認屬性)
|