将对象复制到剪贴板 [英] copy Object to clipoard
本文介绍了将对象复制到剪贴板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好
如何在Visual Studio外部将任何对象设置为剪贴板并将其粘贴到Visual Studio中的表单上.
或如何以
方式读取格式
Hello
how I can set any object to clipboard outside visual studio and Paste it on the form in visual Studio .
or how I can Read a Format by any way as
Object TButton1
left=23
top=5
text='text1'
end
谢谢
And Thanks
推荐答案
您正在尝试使用的对象不是默认剪贴板类型的对象,例如字符串或图像.但是,如果您定义了应该如何处理它们并为剪贴板注册自定义数据格式,则可以使用任何任意数据类型.
此CodeProject文章对此进行了解释:
使用.NET进行剪贴板处理-第II部分 [
You are trying to work with the object which is no a default clipboard type, like a string or an image. Nevertheless, you can work with any arbitrary data types if you define how they should be handled and register a custom data format for the clipboard.
This is explained in this CodeProject article:
Clipboard handling with .NET - Part II[^].
The article explains how to do it in .NET. As the code is written in C#, you can easily figure out how to write it in VB.NET. By the way, if you need help in .NET, it is imperative that you understand at least some of C# as most of the valuable code will be written in this language.
—SA
这里是vb.net中的链接:
[
Here''s a link in vb.net:
[Copy object to clipboard in vb.net]
I haven''t tried it yet, but it looks like it will work.
这篇关于将对象复制到剪贴板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文