CutCopyMaskFormat Property

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:
property MaskFormat CutCopyMaskFormat {
	MaskFormat get();
	void set(MaskFormat value);
}

Property Value

Type: System.Windows.Forms::MaskFormat

One of the MaskFormat values. The default is IncludeLiterals.

Exception Condition
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.

System_CAPS_noteNote

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

.NET Framework
Available since 2.0
Return to top
Show:
© 2016 Microsoft