How to set a text box for inputing password in winforms?

后端 未结 8 1199
伪装坚强ぢ
伪装坚强ぢ 2020-12-01 13:27

how to set a text box for inputing password in winforms? Also I want to show \"Capslock is ON\" popup if capslock is on.

I want something like

8条回答
  •  粉色の甜心
    2020-12-01 14:04

    Just set the property of textbox that is PasswordChar and set the * as a property of textbox. That will work for password.

      passwordtextbox.PasswordChar = '*';
    

    where passwordtextbox is the text box name.

提交回复
热议问题