|
-
Aug 29th, 2000, 05:17 AM
#1
Thread Starter
Hyperactive Member
I use the MS RTF Control, it displays a blank area for people to key in. But I saw before from somebody, that there can be a tool bar, just like in MS Word, to change the color, font or so. Is it true, is it really there>
Or do I write it myself, if so, how?
Thanks for any input.
-
Aug 29th, 2000, 08:05 AM
#2
Yes you can do that. Make a From and add a CommonDialog, CommandButton and RichTextBox and insert the following code into it.
Code:
Private Sub Command1_Click()
'Set the CommonDialog to match the RTFBox
CommonDialog1.Flags = cdlCFEffects Or cdlCFBoth
CommonDialog1.FontName = RichTextBox1.SelFontName
CommonDialog1.FontSize = RichTextBox1.SelFontSize
CommonDialog1.Color = RichTextBox1.SelColor
CommonDialog1.FontBold = RichTextBox1.SelBold
CommonDialog1.FontItalic = RichTextBox1.SelItalic
CommonDialog1.FontUnderline = RichTextBox1.SelUnderline
'Show the FontDialog box
CommonDialog1.ShowFont
'Make changes to the RTFBox
RichTextBox1.SelFontName = CommonDialog1.FontName
RichTextBox1.SelFontSize = CommonDialog1.FontSize
RichTextBox1.SelColor = CommonDialog1.Color
RichTextBox1.SelBold = CommonDialog1.FontBold
RichTextBox1.SelItalic = CommonDialog1.FontItalic
RichTextBox1.SelUnderline = CommonDialog1.FontUnderline
End Sub
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
|