|
-
Jul 8th, 2004, 03:26 PM
#1
Thread Starter
Frenzied Member
How do u copy Colored text from one RTB to another? <Resolved>
How do u copy Colored text from one Richtextbox to another?
It should be easy, but I haven't found the way to do it.
Last edited by longwolf; Jul 8th, 2004 at 04:46 PM.
-
Jul 8th, 2004, 03:29 PM
#2
A couple of ways have worked with me:
VB Code:
RichTextBox1.TextRTF = RichTextBox2.TextRTF
RichTextBox1.SelText = RichTextBox2.TextRTF
Phreak
Visual Studio 6, Visual Studio.NET 2005, MASM
-
Jul 8th, 2004, 04:07 PM
#3
Thread Starter
Frenzied Member
Thx phReAk!
Sounds like they should work.
Unfortunately, the RTB's I'm using are in UserControls.
When I tried adding the TextRTF properties to the UserControl, VB6 went BOOM!!! LOL
I'll post a Resolved if I can get the TextRTF properties working so I can test these.
-
Jul 8th, 2004, 04:45 PM
#4
Thread Starter
Frenzied Member
Got it working.
Thx again phReAk
-
Jul 8th, 2004, 09:15 PM
#5
Member
another question of the same topic...
i want to do something like this:
VB Code:
Text2.Text = Text2.Text & Text1.Text
but with a RTB...
i tried:
VB Code:
Text2.TextRTF = Text2.TextRTF & Text1.TextRTF
but it dont work...
if someone has the answer, plz tell me...
-
Jul 8th, 2004, 09:29 PM
#6
VB Code:
Text2.SelStart = 200000 'Just some high number to put it at the end
Text2.SelRTF = Text1.TextRTF
Try that.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Jul 8th, 2004, 09:42 PM
#7
Member
it worked!...tnx...then another question...
how can i do this:
VB Code:
dim dat as string
dat = text1.textrtf
winsock1.senddata dat
and in another form (or another computer):
VB Code:
dim dat as string
winsock2.getdata dat
text2.SelStart = Len(text2)
text2.SelRTF = dat
will this work? or is there a problem converting the text1.textrtf to string...
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
|