Share via


How do I access the clipboard to copy and paste text, images or generic objects?

Abstract 
This short sample details how to access the clipboard to copy and paste text, images or generic objects. In order to do so this sample uses the Clipboard Class.
clipboard.png

How Do I Video
The corresponding How-Do-I video can be found here.

Source Code
Visual Basic | C#

Additional Resources
.NET Framework Class Library – The Clipboard Class

Prerequisites
The examples were created using Visual Basic 2008 Express/Visual C# 2008 Express but do also apply to earlier versions of Visual Studio.

Enjoy!

   Daniel

Comments

  • Anonymous
    November 26, 2009
    Hi Daniel, very nice sample and introduction. I am a german C# developer and met you at basta 2009 conference in automn in mainz. Since WPF there is another, second class to do operate with the Windows Clibpoard. System.Windows.Clipboard. It's also possible to use this class. I would be grateful to see a comparison of these two classes System.Windows.Forms.Clipboard and System.Windows.Clipboard. I think the best way is to look in the code :) My e-Mail ms.int@online.de Best regards, Marc