how can i load the file that i have selected from the openfile dialog box into a richtextbox
i've tried this
Code:
openfiledialog ff=new .....;
ff.showdialog();
richbox.loadfile(ff.filename);
but it didn't work
also ,if i'm selecting a files with different extension than txt but in the file it self the data are text and it could be opened by a text editor , how can i load it too to a richtextbox " the extension is TFTP"

file dialog and richtextbox question
Jive Dadson
AFoxmore
simple sample code...........
this.openFileDialog1.ShowDialog();
this.richTextBox1.LoadFile(this.openFileDialog1.FileName,RichTextBoxStreamType.RichText);
Peer Larsen
file format is not valid
and marking the last line the code above
sprofaner
richTextBox.LoadFile("filename.ext", RichTextBoxStreamType.UnicodePlainText);
If that does not work, you could load the file first with filestream to string object, and then setting the RichTextBoxe's Text property.
UPV_Team
Do you get Exceptions, or how it does not work