Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Password input (replacing characters entered with "*")

Status
Not open for further replies.

gaus

Programmer
Feb 5, 2001
92
US
Hi,
I imagine this is a keypress event in a text box. In VB 6, how does one replace each character type with an "*", so the password is not displayed as it is entered?
Thanks,
Gary
 
Just set PasswordChar property to * in the Properties Window or set it progmatically by:
Text1.PasswordChar = "*"
 
Hey thanks. I guess I just overlooked that property. However, when I place it in any key related event, when the first of 4 characters is entered, it places 2 * there. So, when typing 1234, I see ***** ( 5 *).
Thanks...
 
Never mind. I just set the txt box text = "" on form load. It's working fine now - thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top