如何设置为的WinForms输入查询密码的文本框?设置为、文本框、密码、WinForms

由网友(别碰我的人生)分享简介:如何设置在的WinForms输入查询密码的文本框?此外,我想显示大写锁定为开弹出如果CAPSLOCK上。how to set a text box for inputing password in winforms? Also I want to show "Capslock is ON" popup if caps...

如何设置在的WinForms输入查询密码的文本框?此外,我想显示大写锁定为开弹出如果CAPSLOCK上。

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

我想是这样

<输入类型=密码/> 的HTML

推荐答案

为您解决问题的最好办法是设置 UseSystemPasswordChar 属性为true。然后,大写锁定信息显示,当用户输入的字段和大写锁定是(至少对于Vista和Windows 7)。

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).

另一种方法是在 PasswordChar 属性设置为一个字符值(*为例)。这也触发自动大写锁定处理。

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

阅读全文

相关推荐

最新文章