Peter,
You shouldn't have to do anything special. If the line with the cast
works and the DraggedNode is populated, then you should be able to access
the properties just like anything else.
However, you might want to consider using some other kind of data
container besides a tree node, as the tree node is part of a visul
component, and transporting those kinds of things across app-domains can
have a bad effect.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Peter Wagner" <Ci****@bigfoot.com> wrote in message
news:Oz*************@tk2msftngp13.phx.gbl...
Hi
There are 2 different .NET Programs A und B.
I'll drag a TreeNode from a TreeView in A into a ListView in B.
In B I'll extract values from the dropped TreeNode.
Unfortunately I don't know how to extract the values. :-(
Code in B
--------------
private void ListView_DragDrop(object sender,
System.Windows.Forms.DragEventArgs e)
{
:
:
:
if( e.Data.GetDataPresent( "Blabla.Node" ) ) // Blabla.Node is a
TreeNode derived Class
{
TreeNode DraggedNode =(TreeNode) e.Data.GetData( "Blabla.Node" );
// Up to above line works the drop. Debugging this code,
DraggedNode // contains the value
'System.Runtime.Remoting.Proxies.__TransparentProx y'
// I don't no how I should work with Proxies. :-(
// How can I extract the values in DraggedNode?
:
:
}
}
TIA
p