Which passwordchar shows a black dot (•) in a winforms textbox?

后端 未结 6 1487
借酒劲吻你
借酒劲吻你 2020-12-24 10:19

Short question here:

In .Net 4.0 Winforms, how do I use the PasswordChar property of a Textbox to show a common bl

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-24 10:41

    Instead of copy/paste a unicode character or setting it in the code-behind you could also change the properties of the TextBox. Simply set "UseSystemPasswordChar" to True and everytghing will be done for you by the Framework. Or in code-behind:

    this.txtPassword.UseSystemPasswordChar = true;

提交回复
热议问题