MaskedTextBox.InsertKeyMode 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定遮罩文字方塊控制項的文字插入模式。
public:
property System::Windows::Forms::InsertKeyMode InsertKeyMode { System::Windows::Forms::InsertKeyMode get(); void set(System::Windows::Forms::InsertKeyMode value); };
public System.Windows.Forms.InsertKeyMode InsertKeyMode { get; set; }
member this.InsertKeyMode : System.Windows.Forms.InsertKeyMode with get, set
Public Property InsertKeyMode As InsertKeyMode
屬性值
InsertKeyMode 值,表示目前的插入模式。 預設為 Default。
例外狀況
當設定這個屬性時,提供了無效的 InsertKeyMode 值。
備註
屬性 InsertKeyMode 會控制 控制項的 MaskedTextBox 字元插入行為。 這個屬性的狀態是由列舉所 InsertKeyMode 定義,它可以一律開啟、一律關閉或設定為遵守使用者鍵盤的設定。 這個屬性會取代鍵盤的插入模式。 例如,如果鍵盤設定為覆寫,但 InsertKeyMode 設定 Insert
為 ,則會 MaskedTextBox 在插入模式中運作。 屬性 IsOverwriteMode 會存取 的 true 插入模式 MaskedTextBox 。
如果變更 會變更 InsertKeyMode 的值 IsOverwriteMode , MaskedTextBox 將會引發 IsOverwriteModeChanged 事件。
如果未設定遮罩,這個屬性就不會有任何作用。
適用於
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應