我可以选择C#Windows应用程序拖放功能自定义图像? [英] Can I choose a custom image for C# Windows Application Drag Drop functions?

查看:94
本文介绍了我可以选择C#Windows应用程序拖放功能自定义图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写一个小的项目,我想利用拖放functionalty缓解一些操作的最终用户。为了使应用程序多了几分吸引力,我想显示被拖动的对象。我已经发现了一些资源,WPF,但我不知道任何WPF,因此它成为一个有点困难咬下来的这单任务整个主题。我想知道如何能与常规C#Windows窗体来完成。到目前为止,我发现所有的拖放教程只是谈论下降影响它只是几个图标preSET。

I am writing a small project where I would like to make use of drag and drop functionalty to ease some of the operations for the end user. To make the application a little more appealing, I would like to display the object being dragged. I have found some resources with WPF, but I don't know any WPF, so it becomes a bit tough to bite down on that whole subject for this single task. I would like to know how this can be done with "regular" C# Windows Forms. So far, all drag drop tutorials I've found just talk about the drop effects which is just a preset of a few icons.

WPF听起来像我想这个项目后学习。

WPF sounds like something I want to learn after this project.

推荐答案

您需要隐藏的默认光标并创建包含自定义映像您自己的窗口,然后移动该窗口与鼠标的位置。

You need to hide the default cursor and create your own window containing your custom image and then move that window with the position of the mouse.

您也可以看看<一个href=\"http://web.archive.org/web/20130127145542/http://www.switchonthe$c$c.com/tutorials/winforms-using-custom-cursors-with-drag-drop\" rel=\"nofollow\">http://web.archive.org/web/20130127145542/http://www.switchonthe$c$c.com/tutorials/winforms-using-custom-cursors-with-drag-drop

更新2015年11月26日

更新的链接指向archive.org的最后一个快照

Updated the link to point to archive.org's last snapshot

这篇关于我可以选择C#Windows应用程序拖放功能自定义图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆