How do I copy the contents of a RichTextBox to another
RichTextBox including the properties of each text/strings
(Font, Bold/Italic/Underline, Color)?
- I'm using VB 6.0 Enterprise Edition
Printable View
How do I copy the contents of a RichTextBox to another
RichTextBox including the properties of each text/strings
(Font, Bold/Italic/Underline, Color)?
- I'm using VB 6.0 Enterprise Edition
This will save/load contents into a RichTextBox.
Code:'Save
RichTextBox1.SaveFile "C:\richfile.rtf", rtfRTF
'Load
RichTextBox1.LoadFile "C:\richfile.rtf", rtfRTF
Is there any other way than saving it to a file? Like
when you press a CommandButton, there's a code which
transfer or copy the exact format of text from
RichTextBox1 to RichTextBox2.
Thanks Matthew!
- I'm using VB 6.0 Enterprise Edition
Code:Private Sub Command1_Click()
RichTextBox2.TextRTF = RichTextBox1.TextRTF
End Sub
TextRTF is the default property, so you can omit it.
Code:RichTextBox2 = RichTextBox1
Got It!!!
Thanks guys!!!!