Clipboard.GetText Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a string containing the text data on the Clipboard.
Overloads
GetText() |
Returns a string containing the UnicodeText data on the Clipboard. |
GetText(TextDataFormat) |
Returns a string containing text data on the Clipboard. |
GetText()
Returns a string containing the UnicodeText data on the Clipboard.
public:
static System::String ^ GetText();
public static string GetText ();
static member GetText : unit -> string
Public Shared Function GetText () As String
Returns
A string containing the UnicodeText data , or an empty string if no UnicodeText data is available on the Clipboard.
Remarks
The UnicodeText data format denotes 16-bit character encoded Unicode, also referred to as UTF-16, and UCS-2.
See also
- GetAudioStream()
- GetDataObject()
- GetData(String)
- GetFileDropList()
- GetImage()
- ContainsText
- SetText
- DataFormats
Applies to
GetText(TextDataFormat)
Returns a string containing text data on the Clipboard.
public:
static System::String ^ GetText(System::Windows::TextDataFormat format);
public static string GetText (System.Windows.TextDataFormat format);
static member GetText : System.Windows.TextDataFormat -> string
Public Shared Function GetText (format As TextDataFormat) As String
Parameters
- format
- TextDataFormat
A member of TextDataFormat that specifies the text data format to retrieve.
Returns
A string containing text data in the specified data format, or an empty string if no corresponding text data is available.
See also
- GetAudioStream()
- GetDataObject()
- GetData(String)
- GetFileDropList()
- GetImage()
- ContainsText
- SetText
- DataFormats