hey, using vb 2005 and i'm trying to use the open/save file dialogs i can save files fine, but when i try to open them i get the rich text formatting codes but not the data inside the .rtf file ( opening it in wordpad shows up correctly though) any help with this would be greatly appreciated
how do you open an RTF file through VB.neti'm trying to open a RTF file but i always seem to get the code as
Page 1 of 1
2 Replies - 10956 Views - Last Post: 16 March 2008 - 02:16 PM
Replies To: how do you open an RTF file through VB.net
#2
Re: how do you open an RTF file through VB.net
Posted 16 March 2008 - 01:38 PM
What control are you using to display the RTF file?
#3
Re: how do you open an RTF file through VB.net
Posted 16 March 2008 - 02:16 PM
dim strfilename as string With OpenFileDialog1 .Filter = "RICHTEXT FILES (*.rtf) |*.rtf" .FilterIndex = 1 .InitialDirectory = "c:\" .Title = "OPEN FILE" .FileName = "" End With If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then STRFILENAME = OpenFileDialog1.FileName Dim OBJREADER As StreamReader = New StreamReader(STRFILENAME) richTextBox1.Text = OBJREADER.ReadLine
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote




|