Hi,
I used the following controls:

The following effects are achieved:

Private Sub Openfile_Click(sender As Object, e As EventArgs) Handles Openfile.Click
Dim file_open As New OpenFileDialog
file_open.Filter = "Rich Text File (*.rtf)|*.rtf| Plain Text File (*.txt)|*.txt"
file_open.FilterIndex = 1
file_open.Title = "Open text or RTF file"
Dim stream_type As RichTextBoxStreamType
stream_type = RichTextBoxStreamType.RichText
If DialogResult.OK = file_open.ShowDialog() Then
If String.IsNullOrEmpty(file_open.FileName) Then Return
If file_open.FilterIndex = 2 Then stream_type = RichTextBoxStreamType.PlainText
RichTextBox1.LoadFile(file_open.FileName, stream_type)
End If
End Sub
Private Sub Font_Click(sender As Object, e As EventArgs) Handles Font.Click
Dim result As DialogResult = FontDialog1.ShowDialog()
If result = DialogResult.OK Then
RichTextBox1.SelectionFont = FontDialog1.Font
End If
End Sub
Hope it be helpful.
Best Regards,
Julie
MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any
compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.