473,698 Members | 2,411 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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. __TransparentPr oxy. There is no
TreeNode information available. I'm absolutely stumped at the moment
and would appreciate any help.

Thanks.
Nov 15 '05 #1
1 2536
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.goo gle.com...
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. __TransparentPr oxy. There is no
TreeNode information available. I'm absolutely stumped at the moment
and would appreciate any help.

Thanks.


Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1021
by: Anjali | last post by:
Hi, I want to implement DragnDrop across th forms of the application. I am able to get some examples to implement DragnDrop across the controls in the same form but I have to implement that across the forms.. Any help on this is highly appreciated. Regards,
2
1177
by: Michael Maercker | last post by:
hi! i come from vb6 and am wondering: what happened to ole_drag/drop? and how can implement dragndrop from the explorer (or any other file list, i.e. winamp) into my listbox in c#? i've done it all in vb6; strange that it's so different in c#... i'm trying to figure it out just now and i sortta got stuck when i noticed that not even the mousecursor changes as i would expect it to, when i set
1
1726
by: thomasp | last post by:
Has anyone got some sample code to do drag and drop from one listbox to another listbox using VB.Net 2005. The below code works for draging and droping one at a time, but not for multiselected items. I tried setting up an array to capture the selected items and then move them with the dragndrop code, but after selecting the items when the user clicks on the items to drag them the selection goes back to one item. Also I have code for the...
3
3302
by: thomasp | last post by:
Has anyone got some sample code to do drag and drop from one listbox to another listbox using VB.Net 2005. The below code works for draging and droping one at a time, but not for multiselected items. I tried setting up an array to capture the selected items and then move them with the dragndrop code, but after selecting the items when the user clicks on the items to drag them the selection goes back to one item. Also I have code for the...
2
1175
by: Sam | last post by:
Hi, In my form I have two ToolStripPanels (TSP), one docked on the left, the other docked on the right. Each of those TSP contains a ToolSrip control. I would like to allow the ToolStrips to move on their respective TSP they belong to, but prevent dragndrop of ToolStrips from one TSP to the other. How can I do that?
3
4713
by: Preben Zacho | last post by:
Hi there I have an XML file that looks like this: <?xml version="1.0" encoding="utf-8"?> <Node xmlns="Level 1"> <Node xmlns="Level 2A"> </Node> <Node xmlns="Level 2B"> <Node xmlns="Level 3A">
2
1217
by: Debbie Croft | last post by:
I have a client who mandates XHTML compliance in the applications they commission. Problem is that I've just found that the Treeview control doesn't produce valid XHTML - even with the appropriate "xhtmlConformance" settings. The problem lies in the post back code. As you can see below, the <script> tag is missing a 'type="text/javascript"' attribute - which is required in XHTML. <script>
0
1118
by: thirunavukarasukm | last post by:
Hai... Problem in Print Friendly Version with treeview control... i am creating one web applications.. in this web application in main page The left side one panel and right side one Iframe control.. i am go to run the page the treeview control to expand corresponding page target to iframe control..
18
15369
by: =?Utf-8?B?TGkgV2VuZw==?= | last post by:
Hi, Is there a way for TreeView to have multiple selections? But I am not talking about its checked boxes. I want a way similar to ListView with MultiSelect = True. So I can use or key and click to make multiple selections. Then when I simply click one item, all previous selections are gone. Thanks in advance.
0
8675
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8604
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9160
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9029
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8862
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2331
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.