我基本上使用的是自己编写的程序,它是一个需要密码才能打开w / e应用程序的程序我也已经分配了它。但我不知道如何将文本变成*而不是常规文本。它只是一个控制台程序。
答案 0 :(得分:-4)
//read from here
private void Form1_Load(object sender, EventArgs e)
{
//changes whatever you type into your textbox to be an asterisk
textBox1.PasswordChar = '*';
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
//ignore this method
}
private void button1_Click(object sender, EventArgs e)
{
//Just to validate that the text is what you want it to be
string text = textBox1.Text;
MessageBox.Show(text);
}