System.Windows.Forms.MaskedTextBox Members

The members of System.Windows.Forms.MaskedTextBox are listed below.

See Also: Inherited members from System.Windows.Forms.TextBoxBase

Public Constructors

Initializes a new instance of the System.Windows.Forms.MaskedTextBox class using defaults.

Initializes a new instance of the System.Windows.Forms.MaskedTextBox class using the specified custom mask language provider.

Initializes a new instance of the System.Windows.Forms.MaskedTextBox class using the specified input mask.

Public Properties

AcceptsTabbool.

Gets or sets a value determining how TAB keys are handled for multiline configurations. This property is not supported by System.Windows.Forms.MaskedTextBox.

AllowPromptAsInputbool.

Gets or sets a value indicating whether MaskedTextBox.PromptChar can be entered as valid data by the user.

AsciiOnlybool.

Gets or sets a value indicating whether the System.Windows.Forms.MaskedTextBox control accepts characters outside of the ASCII character set.

BeepOnErrorbool.

Gets or sets a value indicating whether the masked text box control raises the system beep for each user key stroke that it rejects.

[read-only]
CanUndobool.

Gets a value indicating whether the user can undo the previous operation. This property is not supported by System.Windows.Forms.MaskedTextBox.

CultureSystem.Globalization.CultureInfo.

Gets or sets the culture information associated with the masked text box.

CutCopyMaskFormatMaskFormat.

Gets or sets a value that determines whether literals and prompt characters are copied to the clipboard.

FormatProviderIFormatProvider.

Gets or sets the IFormatProvider to use when performing type validation.

HidePromptOnLeavebool.

Gets or sets a value indicating whether the prompt characters in the input mask are hidden when the masked text box loses focus.

InsertKeyModeInsertKeyMode.

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

[read-only]
IsOverwriteModebool.

Gets a value that specifies whether new user input overwrites existing input.

Linesstring[].

Gets or sets the lines of text in multiline configurations. This property is not supported by System.Windows.Forms.MaskedTextBox.

Maskstring.

Gets or sets the input mask to use at run time.

[read-only]
MaskCompletedbool.

Gets a value indicating whether all required inputs have been entered into the input mask.

[read-only]
MaskedTextProviderSystem.ComponentModel.MaskedTextProvider.

Gets a clone of the mask provider associated with this instance of the masked text box control.

[read-only]
MaskFullbool.

Gets a value indicating whether all required and optional inputs have been entered into the input mask.

override
MaxLengthint.

Gets or sets the maximum number of characters the user can type or paste into the text box control. This property is not supported by System.Windows.Forms.MaskedTextBox.

override
Multilinebool.

Gets or sets a value indicating whether this is a multiline text box control. This property is not fully supported by System.Windows.Forms.MaskedTextBox.

PasswordCharchar.

Gets or sets the character to be displayed in substitute for user input.

PromptCharchar.

Gets or sets the character used to represent the absence of user input in System.Windows.Forms.MaskedTextBox.

ReadOnlybool.

Gets or sets a value indicating whether text in the text box is read-only.

RejectInputOnFirstFailurebool.

Gets or sets a value indicating whether the parsing of user input should stop after the first invalid character is reached.

ResetOnPromptbool.

Gets or sets a value that determines how an input character that matches the prompt character should be handled.

ResetOnSpacebool.

Gets or sets a value that determines how a space input character should be handled.

override
SelectedTextstring.

Gets or sets the current selection in the System.Windows.Forms.MaskedTextBox control.

SkipLiteralsbool.

Gets or sets a value indicating whether the user is allowed to reenter literal values.

override
Textstring.

Gets or sets the text as it is currently displayed to the user.

TextAlignHorizontalAlignment.

Gets or sets how text is aligned in a masked text box control.

[read-only]
override
TextLengthint.

Gets the length of the displayed text.

TextMaskFormatMaskFormat.

Gets or sets a value that determines whether literals and prompt characters are included in the formatted string.

UseSystemPasswordCharbool.

Gets or sets a value indicating whether the operating system-supplied password character should be used.

ValidatingTypeType.

Gets or sets the data type used to verify the data input by the user.

WordWrapbool.

Gets or sets a value indicating whether a multiline text box control automatically wraps words to the beginning of the next line when necessary. This property is not supported by System.Windows.Forms.MaskedTextBox.

Protected Properties

[read-only]
override
CreateParamsCreateParams.

Gets the required creation parameters when the control handle is created.

Public Methods

ClearUndo()

Clears information about the most recent operation from the undo buffer of the text box. This method is not supported by System.Windows.Forms.MaskedTextBox.

override
GetCharFromPosition(System.Drawing.Point) : char
Documentation for this section has not yet been entered.
override
GetCharIndexFromPosition(System.Drawing.Point) : int
Documentation for this section has not yet been entered.
GetFirstCharIndexFromLine(int) : int

Retrieves the index of the first character of a given line. This method is not supported by System.Windows.Forms.MaskedTextBox.

GetFirstCharIndexOfCurrentLine() : int

Retrieves the index of the first character of the current line. This method is not supported by System.Windows.Forms.MaskedTextBox.

override
GetLineFromCharIndex(int) : int

Retrieves the line number from the specified character position within the text of the control. This method is not supported by System.Windows.Forms.MaskedTextBox.

override
GetPositionFromCharIndex(int) : System.Drawing.Point
Documentation for this section has not yet been entered.
ScrollToCaret()

Scrolls the contents of the control to the current caret position. This method is not supported by System.Windows.Forms.MaskedTextBox.

override
ToString() : string

Returns a string that represents the current masked text box. This method overrides TextBoxBase.ToString.

Undo()

Undoes the last edit operation in the text box. This method is not supported by System.Windows.Forms.MaskedTextBox.

ValidateText() : object

Converts the user input string to an instance of the validating type.

Protected Methods

override
CreateHandle()

Creates a handle for the control.

override
IsInputKey(Keys) : bool

Determines whether the specified key is an input key or a special key that requires preprocessing.

override
OnBackColorChanged(EventArgs)

Occurs when the value of the Control.BackColor property changes.

override
OnHandleCreated(EventArgs)

Raises the Control.HandleCreated event.

OnIsOverwriteModeChanged(EventArgs)

Raises the MaskedTextBox.IsOverwriteModeChanged event.

override
OnKeyDown(KeyEventArgs)
Documentation for this section has not yet been entered.
override
OnKeyPress(KeyPressEventArgs)
Documentation for this section has not yet been entered.
override
OnKeyUp(KeyEventArgs)
Documentation for this section has not yet been entered.
OnMaskChanged(EventArgs)

Raises the MaskedTextBox.MaskChanged event.

override
OnMultilineChanged(EventArgs)

Typically raises the MaskedTextBox.MultilineChanged event, but disabled for System.Windows.Forms.MaskedTextBox.

OnTextAlignChanged(EventArgs)

Raises the MaskedTextBox.TextAlignChanged event.

override
OnTextChanged(EventArgs)

Raises the Control.TextChanged event.

override
OnValidating(System.ComponentModel.CancelEventArgs)

Raises the Control.Validating event.

override
ProcessCmdKey(ref Message, Keys) : bool
Documentation for this section has not yet been entered.
override
ProcessKeyMessage(ref Message) : bool
Documentation for this section has not yet been entered.
override
WndProc(ref Message)
Documentation for this section has not yet been entered.

Public Events

AcceptsTabChanged

Occurs when the value of the MaskedTextBox.AcceptsTab property has changed. This event is not raised by System.Windows.Forms.MaskedTextBox.

IsOverwriteModeChanged

Occurs after the insert mode has changed.

MaskChanged

Occurs after the input mask is changed.

MaskInputRejected

Occurs when the user's input or assigned character does not match the corresponding format element of the input mask.

MultilineChanged

Typically occurs when the value of the MaskedTextBox.Multiline property has changed; however, this event is not raised by System.Windows.Forms.MaskedTextBox.

TextAlignChanged

Occurs when the text alignment is changed.

TypeValidationCompleted

Occurs when System.Windows.Forms.MaskedTextBox has finished parsing the current value using the MaskedTextBox.ValidatingType property.