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

后端 未结 8 1196
伪装坚强ぢ
伪装坚强ぢ 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:08

    The best way to solve your problem is to set the UseSystemPasswordChar property to true. Then, the Caps-lock message is shown when the user enters the field and the Caps-Lock is on (at least for Vista and Windows 7).

    Another alternative is to set the PasswordChar property to a character value (* for example). This also triggers the automatic Caps-Lock handling.

提交回复
热议问题