468,133 Members | 1,655 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,133 developers. It's quick & easy.

TreeView drag-n-drop between applications

I would like to be able to drag-n-drop System.Windows.Forms.TreeNode
objects between two different applications (actually the same
application, just two instances of it) in C#. I've seen posts in
which people advise that this process is no different the
intra-application drag-n-drop process. I've had no luck with this
concept. In fact, when I drag a node from application A's TreeView to
application B's TreeView and call the GetData method on the Data
object from the DragEventArgs, the result is some kind of
System.Runtime.Remoting.Proxy.__TransparentProxy. There is no
TreeNode information available. I'm absolutely stumped at the moment
and would appreciate any help.

Thanks.
Nov 15 '05 #1
1 2310
Kevin,

This is most likely because the TreeNode class is not marked as serializable
and is therefore marshalled between application domains by reference. I
would suggest creating a simple serializable type describing the data in the
node and use an instance of this type as the data object for the drag and
drop operation.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Kevin Henkener" <he******@email.uc.edu> wrote in message
news:7d**************************@posting.google.c om...
I would like to be able to drag-n-drop System.Windows.Forms.TreeNode
objects between two different applications (actually the same
application, just two instances of it) in C#. I've seen posts in
which people advise that this process is no different the
intra-application drag-n-drop process. I've had no luck with this
concept. In fact, when I drag a node from application A's TreeView to
application B's TreeView and call the GetData method on the Data
object from the DragEventArgs, the result is some kind of
System.Runtime.Remoting.Proxy.__TransparentProxy. There is no
TreeNode information available. I'm absolutely stumped at the moment
and would appreciate any help.

Thanks.


Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Michael Maercker | last post: by
1 post views Thread by thomasp | last post: by
3 posts views Thread by thomasp | last post: by
2 posts views Thread by Sam | last post: by
3 posts views Thread by Preben Zacho | last post: by
2 posts views Thread by Debbie Croft | last post: by
18 posts views Thread by =?Utf-8?B?TGkgV2VuZw==?= | last post: by
27 posts views Thread by didacticone | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.