I want to open a text file into a richtextbox without using a OpenFileDialog in VB.NET
Asked
Active
Viewed 2,730 times
-2
-
2`richTextBox1.LoadFile("C:\MyDocument.rtf")` – The Blue Dog Oct 23 '14 at 16:56
1 Answers
0
In VB.NET 2012. Something like this works
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
Me.RichTextBox1.LoadFile("C:\MyDocument.rtf", RichTextBoxStreamType.PlainText)
End Sub
End Class
Take a look at the RichTextBoxStreamType Enumeration

Rose
- 641
- 7
- 17