-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathForm1.vb
28 lines (23 loc) · 965 Bytes
/
Form1.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Imports System
Imports System.ComponentModel
Imports System.Drawing
Imports System.Windows.Forms
Imports DevExpress.XtraRichEdit
Imports DevExpress.XtraRichEdit.Services
Namespace WindowsFormsApplication1
Public Partial Class Form1
Inherits Form
Public Sub New()
InitializeComponent()
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
richEditControl1.ReplaceService(Of ISyntaxHighlightService)(New HTMLSyntaxHighlightService(richEditControl1))
Using server As IRichEditDocumentServer = richEditControl1.CreateDocumentServer()
server.Text = "some HTML text"
richEditControl1.Text = server.HtmlText
End Using
richEditControl1.Document.DefaultCharacterProperties.FontName = "Consolas"
richEditControl1.Document.DefaultCharacterProperties.FontSize = 9
End Sub
End Class
End Namespace