开发者

How to put data into clipboard on a Windows Mobile device written in .NET?

I want to put some data in the clipboard using c# and the Compact Framew开发者_StackOverflowork. I am using a Windows Mobile device.

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


with a using System.Windows.Forms;

Clipboard.SetDataObject()


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜