App wont save inline images,, thy load and del on re-opening of the rtf
public void SaveMyFile()
{
SaveFileDialog saveFile1 = new SaveFileDialog();
saveFile1.DefaultExt = "*.rtf";
saveFile1.Filter = "RTF Files|*.rtf";
if (saveFile1.ShowDialog() == System.Windows.Forms.DialogResult.OK && saveFile1.FileName.Length > 0)
{
textArea.SaveFile(saveFile1.FileName, RichTextBoxStreamType.TextTextOleObjs);
}
}
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
private void addImage(String name) {
try
{
string szFileName = Path.Combine(Environment.CurrentDirectory,@"..\..\emoticons\"+name+".png"); Bitmap bitImage = new Bitmap(szFileName); Clipboard.SetDataObject(bitImage);
DataFormats.Format objFormat =DataFormats.GetFormat(DataFormats.Bitmap);
if (textArea.CanPaste(objFormat))
{
textArea.Paste(objFormat);
}
}
catch (Exception)
{ textArea.AppendText("ErroR"); }
}
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
When I re-open the App and load the rtf the loaded images are gone please help