MaskedTextBox.UseSystemPasswordChar 屬性

定義

取得或設定值,指出是否應該使用作業系統提供的密碼字元。

public:
 property bool UseSystemPasswordChar { bool get(); void set(bool value); };
public bool UseSystemPasswordChar { get; set; }
member this.UseSystemPasswordChar : bool with get, set
Public Property UseSystemPasswordChar As Boolean

屬性值

Boolean

如果應該使用系統密碼做為提示字元,則為 true,否則為 false。 預設為 false

例外狀況

指定的密碼字元與目前的提示字元 PromptChar 相同。 這兩個項目不能相同。

備註

屬性 UseSystemPasswordChar 會判斷是否應該在 中 MaskedTextBox 顯示使用者提供的輸入,做為作業系統所定義之密碼字元的多次出現。 UseSystemPasswordChar 函式與 PasswordChar 屬性類似,但不會使用程式設計人員提供的字元來進行提示, UseSystemPasswordChar 而是使用作業系統所定義的提示。 此屬性的優先順序高於 PasswordChar

重要

基於安全性考慮, MaskedTextBox 控制項會停用密碼保護字串上的剪下和複製作業。

適用於

另請參閱