This sample shows you how to place and retrieve items from the Clipboard in multiple formats. It demonstrates the primary properties and methods used when using the Clipboard.
Requires Microsoft Visual Studio.NET and Windows 2000 or Windows XP.
To use this sample, run the application and then explore the "Edit"
menu options. Select "Edit -> Copy Text As -> RTF", as
an example. Then select "Edit -> Paste As -> Rich Text Format". You can
then examine how the text is pasted differently into a
RichTextBox and a TextBox.
Then try the same with HTML. Note that the RichTextBox does not support
the HTML format. Try to paste the HTML into an HTML editor
(a Visual Studio .NET HTML document works well). See how it is pasted
correctly.
Then try "Edit -> Paste As -> All Formats", and notice that multiple
versions of the same text are stored on the Clipboard. You can now paste
as Text, RTF, HTML, and a proprietary XML format.
Clipboard Class Placing data on the Clipboard Retrieve Information from the Clipboard