问题是这样的,有没有办法在不使用.NET中的Clipboard类的情况下将文本和/或文件复制到Windows剪贴板中?
问题是这样的,有没有办法在不使用.NET中的Clipboard类的情况下将文本和/或文件复制到Windows剪贴板中?
根据问题的标题或正文来回答...即使没有访问System.Windows.Forms,也可以访问System.Windows.Clipboard...
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);