Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

MaskedTextBox.CutCopyMaskFormat Property

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

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public MaskFormat CutCopyMaskFormat { get; set; }

Property Value

Type: System.Windows.Forms.MaskFormat
One of the MaskFormat values. The default is IncludeLiterals.

ExceptionCondition
InvalidEnumArgumentException

Property set with a MaskFormat value that is not valid.

The CutCopyMaskFormat property determines how text, selected within the MaskedTextBox control, is interpreted when it is copied to the clipboard or retrieved through the SelectedText property. Specifically, it determines whether literal characters, prompt characters, or both are included when selected text is accessed. When prompt characters are excluded, they are transformed into spaces in the copied string.

NoteNote

The TextMaskFormat property serves a similar purpose with respect to how the Text property is interpreted.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft