Welcome to MSDN Blogs Sign in | Join | Help

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

Published Thursday, September 17, 2009 9:24 AM by Walzenbach

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

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

Thursday, November 26, 2009 3:26 PM by M. Schubert

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

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker