|
-
Aug 15th, 2000, 02:58 AM
#1
Thread Starter
Lively Member
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
-
Aug 15th, 2000, 03:19 AM
#2
This will save/load contents into a RichTextBox.
Code:
'Save
RichTextBox1.SaveFile "C:\richfile.rtf", rtfRTF
'Load
RichTextBox1.LoadFile "C:\richfile.rtf", rtfRTF
-
Aug 15th, 2000, 05:17 AM
#3
Thread Starter
Lively Member
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
-
Aug 15th, 2000, 06:02 AM
#4
Code:
Private Sub Command1_Click()
RichTextBox2.TextRTF = RichTextBox1.TextRTF
End Sub
-
Aug 15th, 2000, 09:03 AM
#5
TextRTF is the default property, so you can omit it.
Code:
RichTextBox2 = RichTextBox1
-
Aug 15th, 2000, 08:30 PM
#6
Thread Starter
Lively Member
Got It!!!
Thanks guys!!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|