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 try
{ {
Clipboard.Clear(); Clipboard.Clear();
Clipboard.SetText(sb.ToString()); DataObject dao = new DataObject();
//DataObject dataobj = new DataObject(DataFormats.Rtf,rtb.Rtf); dao.SetData(DataFormats.Text,sb.ToString());
Clipboard.SetData(DataFormats.Rtf, rtb.Rtf); dao.SetData(DataFormats.Rtf, rtb.Rtf);
Clipboard.SetDataObject(dao, true, 10, 500);
MessageBox.Show(sb.ToString(), "Copied to Clipboard", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show(sb.ToString(), "Copied to Clipboard", MessageBoxButtons.OK, MessageBoxIcon.Information);
} }
catch (Exception ex) catch (Exception ex)