C# TextBox控件输入框密码“*”号隐藏,需要用到TextBox控件的PasswordChar属性,例如:
this.usernameField = new System.Windows.Forms.TextBox(); this.passwordField.PasswordChar = '*';
设置TextBox的PasswordChar属性为*字符之后,在我们输入密码的时候,密码就会显示“*”号隐藏了。
C# TextBox控件输入框密码“*”号隐藏,需要用到TextBox控件的PasswordChar属性,例如:
this.usernameField = new System.Windows.Forms.TextBox(); this.passwordField.PasswordChar = '*';
设置TextBox的PasswordChar属性为*字符之后,在我们输入密码的时候,密码就会显示“*”号隐藏了。