Click here to Skip to main content
15,891,567 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I load richtextbox using loadfile method
1. richTextBoxVision.LoadFile(path) and another method
using (System.IO.FileStream streamRTF = new System.IO.FileStream(path, System.IO.FileMode.Open))
{

richTextBoxVision.LoadFile(streamRTF, RichTextBoxStreamType.RichText);
streamRTF.Dispose();
}
both method works but doesn't load rtf file having text with images in richtextbox
.
So how could solve this problem ?
any idea?
thanks in advance..
Posted
Updated 15-Jan-14 20:33pm
v2
Comments
ZurdoDev 15-Jan-14 12:44pm    
Can you not make sure the file is closed and do it your first way?
Karthik_Mahalingam 15-Jan-14 13:21pm    
make sure that the file is completely closed. check in task manager that the file exists or not ??
if exits kill the process and try loading the file once again..
sp_suresh 15-Jan-14 19:16pm    
could you please tell me how to close file in first method?

1 solution

Try using the File.Copy("source file path", "copy file path") method in System.IO. Then see if you can open the copy.
 
Share this answer
 
Comments
sp_suresh 16-Jan-14 1:08am    
Please ,see i am loading rtf file having images and text,tables etc .Its will display only text,tables but not images.And above error is gone for accessing error it was due to in task it was remaining so this error cleared but i want to display rtf file with image ....

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