Search code examples
c#textbox

password for Login Application in c# windows form


How to display password as "**" in the text box instead of displaying real password on text box? Is it possible in c#

Thanks


Solution

  • Just set up a property of textbox:

    textBox1.UseSystemPasswordChar = true;
    

    and you can also set the char for password what you want to:

    textBox1.PasswordChar = '*';