C# RichTextBox contents to clipboard.
Posted on 2011-03-18
I have a RichTextBox with some colored (RTF) formatted text in it.
What I would like to do is be able to copy the contents to the clipboard, but do it like wordpad
So for example if I type some and color it in there and cut and paste it maintains the formatting if
i pate it to another instance it maintains the formatting. If I paste it into notepad it drops the
formatting and pasts it as plain text becuase notepad does not support it.
So my question is how to set the clipboard with C# so if the target app supports RTF it gets the
formatted text but if it is going to notepad it will downgrade. At the moment it seems like an either / or situation.