Fixed logic to support the clipboard in RTF and Ascii text at the same time.

This commit is contained in:
Rich 2012-11-13 16:28:32 +00:00
parent 4056f5fd96
commit 384a30aa23

View File

@ -483,9 +483,10 @@ namespace Sync
try
{
Clipboard.Clear();
Clipboard.SetText(sb.ToString());
//DataObject dataobj = new DataObject(DataFormats.Rtf,rtb.Rtf);
Clipboard.SetData(DataFormats.Rtf, rtb.Rtf);
DataObject dao = new DataObject();
dao.SetData(DataFormats.Text,sb.ToString());
dao.SetData(DataFormats.Rtf, rtb.Rtf);
Clipboard.SetDataObject(dao, true, 10, 500);
MessageBox.Show(sb.ToString(), "Copied to Clipboard", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch (Exception ex)