Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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


PHP
Object TButton1
left=23
top=5
text='text1'
end


And Thanks
Posted
Comments
Sergey Alexandrovich Kryukov 17-Apr-12 17:48pm    
Why the type is object? Isn't it Button? Why writing such object in the clipboard? What semantic should be implemented behind that? Anyway, you can implement any, even though I don't think it makes sense if this is a button or other control...
--SA

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
 
Share this answer
 
Comments
VJ Reddy 17-Apr-12 20:57pm    
Very good reference. 5!
Sergey Alexandrovich Kryukov 17-Apr-12 22:10pm    
Thank you, VJ. Hope it will explain to OP how to do such things.
--SA
Manoj Kumar Choubey 17-Apr-12 23:58pm    
nice
Sergey Alexandrovich Kryukov 18-Apr-12 0:02am    
Thank you, Manoj.
--SA
Zenarov 18-Apr-12 0:19am    
Why the type is object? Isn't it Button?

ok its not object ( yes its button or dataset or textbox)

This is explained in this CodeProject article:
Clipboard handling with .NET - Part II[^].

yes I see This Exsample but its set and get A picture or Text and I need Paste Any Windows.Forms Control On The Form

This is Some Link Too
http://www.vb-helper.com/howto_net_clipboard_object.html

thanks
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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900