-
October 13th, 2003, 04:49 AM
#1
has anybody tried this
RTB1.TextRTF = RTB1.TextRTF & vbNewLine & strData
RTB stands for RichTextBox
and strData is a string containing RTB2.TextRTF, from an another form
What i want is what ever is the Font Name, Size of RTB1 should not change &
fonts coming from another form should b displayed in RTB1 with its own Font Name, Size
-
October 13th, 2003, 05:04 AM
#2
Code:
Private Sub CmdMerge_Click()
With Rtfb1
.SelStart = Len(.Text) + 2
.SelLength = 0
.SelText = vbNewLine
.SelStart = Len(.Text) + 2
.SelLength = 0
.SelRTF = Rtfb2.TextRTF
.SelLength = 0
End With
End Sub
Private Sub Form_Load()
With Rtfb1
.Text = "Hello, World!"
.SelStart = 0
.SelLength = Len(.Text)
.SelBold = True
.SelFontName = "Courier New"
.SelFontSize = 10
.SelLength = 0
End With
With Rtfb2
.Text = "A lovely day for me!"
.SelStart = 0
.SelLength = Len(.Text)
.SelBold = False
.SelFontName = "Arial"
.SelFontSize = 12
.SelColor = vbRed
.SelLength = 0
End With
End Sub
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
October 13th, 2003, 11:56 PM
#3
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
|