如何开始实现不同进程之间的拖放?
我正在开发的应用程序是用 C# 编写的 Windows 窗体应用程序。它有一个树视图。每个树节点都存储一些数据。我想要做的是打开应用程序的两个副本,将一些树节点从一个应用程序拖动到另一个应用程序。树节点存储的数据应传输到另一个应用程序,以便在另一个应用程序上构建树节点。我想知道如何实现这样的拖放功能?感谢您的帮助。
The application that I am developing is a windows form application written in C#. It has a treeview on it. Each of the treeNode stores some data. What I want to do is to open two copies of the application, drag some of the treenodes from one application and drop to another. The data the treenodes store should be transferred to another application to build treenodes on another application. I wonder how to implement the drag and drop functionality like this? Thanks for your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为如果您将类型标记为 [Serializable] 并实现自定义序列化,它应该可以工作。否则,您可以自己将它们序列化到 MemoryStream,然后使用任何自定义数据格式将该 MemoryStream 添加到数据对象。
I think if you mark your types as [Serializable] AND implement custom serialization, it should work. Otherwise, you can serialize them yourself to a MemoryStream and then add that MemoryStream to the data object using any custom data format.