2020-03-14 每日一例第7天

1.新建窗体windowform,修改text值;

C#制作密码文本框

 

 

2.两个按钮后台代码:

 

 

private void button1_Click(object sender, EventArgs e)
{

//转为字符串
textBox1.PasswordChar =(char)0;
}

 

private void button2_Click(object sender, EventArgs e)
{

//转为密码框
textBox1.PasswordChar = '*';
}

 3.例题完成,最后效果如下:

 C#制作密码文本框

 

 C#制作密码文本框

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-25
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-30
  • 2022-12-23
  • 2021-07-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
相关资源
相似解决方案