Export (0) Print
Expand All
Expand Minimize

PasswordChar Property

Visual Studio .NET 2003

Determines whether the characters entered by a user or placeholder characters are displayed in a TextBox control; determines the character used as a placeholder. Available at design time and run time.

TextBox.PasswordChar[ = cCharString]

Property Values

cCharString
Specifies the characters displayed in a text box.

Remarks

Use this property to create a password field in a dialog box. Although you can use any character, most applications use the asterisk (*), ANSI character 42.

This property does not affect the Value property setting; it contains exactly what the user types or what was set from code. Set PasswordChar to an empty string ("") to display the actual text. The default setting is an empty string.

You can assign any string to this property, but only the first character is significant; all others are ignored.

See Also

Format Property | InputMask Property | Value Property

Applies To: TextBox Control

Show:
© 2014 Microsoft