http://bbs.vbstreets.ru/download.php?id=1587
Пример использования (rtfData - объект RichTextBox):
- Код: Выделить всё
On Error Resume Next
Dim aaa As clsFormatter
Set aaa = New clsFormatter
rtfData.Text = "RichTextBox"
aaa.hwnd = Me.rtfData.hwnd
aaa.WholeText = False
aaa.SelStart = 4
aaa.SelLength = 4
aaa.FontBold = True
aaa.FontItalic = True
aaa.FontUnderline = True
aaa.FontName = "Arial"
aaa.FontSize = 10
aaa.Color = vbRed
aaa.BackColor = vbBlue
aaa.Execute
aaa.BackColor = vbYellow
aaa.Color = vbBlack
aaa.SelStart = 8
aaa.SelLength = 4
aaa.Execute
rtfData.SetFocus