I have the following code that is successfully opening my *.rtf file:
If File.Exists(Fil ePath) Then
Try
Dim MyFileStream As New FileStream(File Path,
FileMode.Open)
RichTextBox1.Lo adFile(MyFileSt ream,
RichTextBoxStre amType.PlainTex t)
MyFileStream.Cl ose()
Catch ex As Exception
MessageBox.Show (ex.Message)
End Try
Else
MsgBox("I'm afraid I could not find your instructions
file.")
Me.Close()
End If
Problem is, it's showing all sorts of giberish along with the text. I
thought a RichTextBox would display the file as if I was opening it in
Wordpad or some other Rich Text File viewer.
What am I missing here?
Thanks.
-Dan
If File.Exists(Fil ePath) Then
Try
Dim MyFileStream As New FileStream(File Path,
FileMode.Open)
RichTextBox1.Lo adFile(MyFileSt ream,
RichTextBoxStre amType.PlainTex t)
MyFileStream.Cl ose()
Catch ex As Exception
MessageBox.Show (ex.Message)
End Try
Else
MsgBox("I'm afraid I could not find your instructions
file.")
Me.Close()
End If
Problem is, it's showing all sorts of giberish along with the text. I
thought a RichTextBox would display the file as if I was opening it in
Wordpad or some other Rich Text File viewer.
What am I missing here?
Thanks.
-Dan
Comment