Export (0) Print
Expand All

MaskedTextBox.InsertKeyMode Property

Gets or sets the text insertion mode of the masked text box control.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

public InsertKeyMode InsertKeyMode { get; set; }
/** @property */
public InsertKeyMode get_InsertKeyMode ()

/** @property */
public void set_InsertKeyMode (InsertKeyMode value)

public function get InsertKeyMode () : InsertKeyMode

public function set InsertKeyMode (value : InsertKeyMode)

Not applicable.

Property Value

An InsertKeyMode value that indicates the current insertion mode. The default is Default.

Exception typeCondition

InvalidEnumArgumentException

An invalid InsertKeyMode value was supplied when setting this property.

The InsertKeyMode property controls the character insertion behavior of the MaskedTextBox control. The state of this property is defined by the InsertKeyMode enumeration, which can be always on, always off or set to respect the setting of the user's keyboard. This property supersedes the insertion mode of the keyboard. For example, if the keyboard is set to overwrite, but InsertKeyMode is set to Insert, the MaskedTextBox will operate in insert mode. The IsOverwriteMode property will access the true insertion mode of the MaskedTextBox.

If changing InsertKeyMode changes the value of IsOverwriteMode, MaskedTextBox will raise the IsOverwriteModeChanged event.

This property has no effect if no mask has been set.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft