views:

73

answers:

2

I want to put some data in the clipboard using c# and the Compact Framework. I am using a Windows Mobile device.

How to put data into clipboard on a Windows Mobile device written in C#?

+1  A: 

with a using System.Windows.Forms;

Clipboard.SetDataObject()
sadboy
+1  A: 

Remember that the clipbard belongs to the user, so you should never put data into the clipboard unless the user asks you to. (by choosing cut/copy etc).

.NET has a Clipboard object that you can use to put data in the clipboard.

the clipboard object has several static methods that you can use to SetText, SetImage, SetAudio or SetDataObject

Note: An object must be serializable for it to be put on the Clipboard. If you pass a non-serializable object to a Clipboard method, the method will fail without throwing an exception.

John Knoeller