密码字段应为C#中的星号形式 [英] Password field should in the star form in C#

查看:102
本文介绍了密码字段应为C#中的星号形式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生您好,
我已经为用户名"和"Windows窗体中的密码.但是我已经在数据库中创建了用户名和密码.但是在执行窗体后,在文本框中输入的密码是可见的.我不希望密码可见.应该在星型视图中查看.我认为这是要在< b>中完成的. Windows仅窗体</b>.
请帮忙,需要紧急.

谢谢& Reagrds
Pradeep CB

Hello sir,
i had created textbox for both Username & password in windows form.But i had created a user name and password in database.But after executing the form,in the textbox the password entered is visible.I dont want the password to be visible .It should be seen in star view..I wnat this to be done in<b> windows form only</b>.
plz do help,need urgent.

Thanks & Reagrds
Pradeep CB

推荐答案

尝试一下
Textbox=>properties=>PasswordChar=*


在设计视图中的表单上,选择您的密码文本框.

在属性网格中,找到属性"PasswordChar",然后在其中输入星号(*).
On your form in design view, select your password textbox.

In the properties grid, find the property "PasswordChar" and put in the asterisk (*) there.


TextBox上将UseSystemPasswordChar 设置为true.
Set UseSystemPasswordChar to true on the TextBox.


这篇关于密码字段应为C#中的星号形式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆