小编Chr*_*ris的帖子

C# 登录屏幕的隐藏密码 - 帮助和想法

我想在文本框中隐藏密码。密码是硬编码的,我知道这不是很好,但它是项目所需的全部。

目前我正在使用点击事件,但是当使用选项卡时没有实现代码。

如何才能做到这一点?这是我当前的代码:

// Password Text Box Click Event

private void txtPassword_Click(object sender, EventArgs e)

{

// When password text box clixked, the watermark will disappear

txtPassword.Text = "";

txtPassword.ForeColor = Color.Black;

txtPassword.PasswordChar = '?'; // Password masking for added security

}
Run Code Online (Sandbox Code Playgroud)

c# login

3
推荐指数
1
解决办法
6914
查看次数

标签 统计

c# ×1

login ×1