fthomas137
Member
- Joined
- Oct 7, 2010
- Messages
- 7
- Programming Experience
- Beginner
Hey all,
I'd like to ask if anyone knows how to properly use the clipboard to take information from a rich text box and send it to the clipboard. You see, if I try the following, which is pulling text from a rich text box, named RichTextBox2:
Now when I do this, I get nothing back. The clipboard is empty.
If I do this,
I will get the text from the text box, but all formatting, like carriage returns is lost. But if I just do a manual copy/paste from the box, all is well.
Any ideas the right way to do this? BTW, I'm using Visual Basic 2010.
Thanks way ahead of time!
Frank
I'd like to ask if anyone knows how to properly use the clipboard to take information from a rich text box and send it to the clipboard. You see, if I try the following, which is pulling text from a rich text box, named RichTextBox2:
VB.NET:
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Clipboard.Clear()
Clipboard.SetText(RichTextBox2.Text, TextDataFormat.Rtf)
MsgBox("Spinnable Text Copied To Clipboard")
End Sub
Now when I do this, I get nothing back. The clipboard is empty.
If I do this,
VB.NET:
Clipboard.SetText(RichTextBox2.Text, TextDataFormat.Text)
I will get the text from the text box, but all formatting, like carriage returns is lost. But if I just do a manual copy/paste from the box, all is well.
Any ideas the right way to do this? BTW, I'm using Visual Basic 2010.
Thanks way ahead of time!
Frank