Guest User

Untitled

a guest
Dec 17th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. FileStream tempFile = File.Open(@"C:RTF.rtf", FileMode.Open);
  2. tempFile.Position = 0;
  3. rtbEx.LoadFile(tempFile, RichTextBoxStreamType.RichText);
  4. tempFile.Close();
  5.  
  6. rtbEx.LoadFile(@"C:UsersWilbur OmaeDesktopRTF.rtf", RichTextBoxStreamType.RichText);
  7.  
  8. rtbEx.Rtf = RTF;
  9.  
  10. Clipboard.SetText(RichTextBox1.Rtf, TextDataFormat.Rtf);
  11.  
  12. RichTextBox1.Text= Clipboard.GetText()
  13.  
  14. public class SermonReader : Form
  15. {
  16. public RichTextBoxEx rtbEx= new RichTextBoxEx();
  17. private string RTF = "";
  18.  
  19. public SermonReader(string rtf)
  20. {
  21. RTF = rtf;
  22.  
  23. Shown += new EventHandler(ehFormShown);
  24. FormBorderStyle = FormBorderStyle.None;
  25. TopLevel = false;
  26.  
  27. Controls.Add(rtbEx);
  28.  
  29. rtbEx.Dock = DockStyle.Fill;
  30. }
  31. private void ehFormShown(object sender, EventArgs e)
  32. {
  33. rtbEx.Rtf = RTF;
  34. }
  35. }
Add Comment
Please, Sign In to add comment