title: Hidden Password for C# Login Screen - Help & Ideas
body: <p>I want to hide a password in a text box. The password is hard coded, which I know is not great but is all that is required for the project.</p>
  
  <p>At the moment I am using click event but then when tab is used does not implement the code.</p>
  
  <p>How can this be done? This is my current code:</p>
  
  <pre><code>// 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
  
  }
  </code></pre>