2016-05-06
Visual Studio 2015
//richTextBox1.LoadFile(listBox1.Items[i].ToString()); // Error,讀取 HTML 內容和 rtf 格式不相容,無法讀取 //richTextBox1.LoadFile(fileNamePath, RichTextBoxStreamType.PlainText); // 讀取 UTF-8 網頁存檔案會變成亂碼 string rtfText1 = System.IO.File.ReadAllText(fileNamePath); //richTextBox1.Rtf = rtfText1; richTextBox1.Text = rtfText1; //string plainText = richTextBox1.Text; System.IO.File.WriteAllText(@"output.txt", plainText); |
(完)
沒有留言:
張貼留言