开发者

Copy to clipboard without System.Windows.Forms.Clipboard?

Well the question is that. Is there anyway to copy text and/or files to the Windows clipboard WITHOUT using Clipboard Class from .NET开发者_开发百科?


Depends on if I am answering the question in the title or in the text... you can access System.Windows.Clipboard without having access to System.Windows.Forms...

string textData = "I want to put this string on the clipboard.";

// After this call, the data (string) is placed on the clipboard and tagged
// with a data format of "Text".
System.Windows.Clipboard.SetData(DataFormats.Text, (Object)textData);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜