Clipboard.GetText 方法

定義

傳回字串,其中包含剪貼簿上的文字資料。

多載

GetText()

傳回字串,其中包含剪貼簿上的 UnicodeText 資料。

GetText(TextDataFormat)

傳回字串,其中包含剪貼簿上的文字資料。

GetText()

傳回字串,其中包含剪貼簿上的 UnicodeText 資料。

public:
 static System::String ^ GetText();
public static string GetText ();
static member GetText : unit -> string
Public Shared Function GetText () As String

傳回

包含 UnicodeText 資料的字串,如果剪貼簿上沒有可用的 UnicodeText 資料,則傳回空字串。

備註

資料 UnicodeText 格式表示 16 位字元編碼的 Unicode,也稱為 UTF-16 和 UCS-2。

另請參閱

適用於

GetText(TextDataFormat)

傳回字串,其中包含剪貼簿上的文字資料。

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

參數

format
TextDataFormat

會指定要擷取之文字資料格式的 TextDataFormat 成員。

傳回

字串,其中包含指定之資料格式的文字資料,如果沒有可用的對應文字資料,則傳回空字串。

另請參閱

適用於