0
我曾嘗試下面的代碼:獲得同樣豐富的文本格式兩次不等於
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Copy clipboard text twice
TextBox1.Text = Clipboard.GetText(TextDataFormat.Rtf)
TextBox2.Text = Clipboard.GetText(TextDataFormat.Rtf)
If TextBox1.Text = TextBox2.Text Then
'this is the output while copying from Notepad
OutputTextBox.Text = "True"
Else
'this is the output while copying from MS Word
OutputTextBox.Text = "False"
End If
End Sub
當我從微軟Word複製文本,致富文本格式兩次是不一樣的。雖然文本已被複制一次並分配兩次。
我的代碼有什麼問題?
謝謝!我發現在幾乎結束的部分TextBox1.Text和TextBox2.Text之間的區別。 – arnobpl