file read richtextbox when i call ....

zabsmarty

Member
Joined
Mar 3, 2006
Messages
5
Programming Experience
Beginner
when i click the button it open afile and that file can read the RichTextbox content in VB.NET can any one help me
 
Really not sure how "file can read the RichTextBox content". Can you please re-phrase that?
 
Read an *.rtf file into a RichTextBox?


Using an open file dialog:
VB.NET:
OpenFileDialog1.Filter = "RTF Files|*.rtf|All Files|*.*"
If OpenFileDialog1.ShowDialog = DialogResult.OK Then
    RichTextBox1.LoadFile(OpenFileDialog1.FileName)
End If
Using filename:
VB.NET:
RichTextBox1.LoadFile("C:\foldername\filename.rtf")

Saving is just the opposite:
RichTextBox1.SaveFile("C:\foldername\filename.rtf")
 
Back
Top