Click here to Skip to main content
15,910,981 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
1. Last time I asked question that how to load rtf file having images and text file in richtextbox
in C# winform
2. I didn't get answer so here i again ask a question whether it is possible to load rtf file having images and text in richtextbox in C# winform?
3. If not possible tell me other options also so that i will display this rtf file in proper format
3. Is it possible to check that rtf file format is corrupted when editing document
Posted

1 solution

Yes, I just tried:
1) Created an new file in Word, with a line of text, a line of italic text and a JPG image.
2) Saved file as RTF.
3) Used a hex editor to ensure the image was embedded. It was, I could see the image binary data.
4) Dropped a RichTextBox on a form
5) Added a button
6) Handled the button click event:
C#
private void myButton_Click(object sender, EventArgs e)
     {
     myRichTextBox.LoadFile(@"D:\Temp\MyRtf.rtf");
     }

7) Ran program, pressed button.
8) Looked at text and picture...
 
Share this answer
 
Comments
sp_suresh 16-Jan-14 5:56am    
What do you mean by
Used a hex editor to ensure the image was embedded. It was, I could see the image binary data.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900