当 darg 源位于我的应用程序之外时如何覆盖默认拖放光标
在拖放中,如果我想自定义光标,可以在拖动源上订阅GiveFeedback
并设置e.UseDefaultCursors = false
,并渲染出我想要的内容。
但这仅在拖动源是我的应用程序时才有效。例如,如果我想在从资源管理器拖动文件时执行相同的操作,则我无法订阅该事件,因为我只能访问放置目标,而不能访问拖动源。
有没有其他方法可以禁用内置光标以及复制和链接符号,以便我可以在这种情况下渲染自己的光标?
In Drag&Drop, if I want to customize the cursors, I can subscribe to GiveFeedback
on the drag source and set e.UseDefaultCursors = false
, and the render the content I want.
But that only work if the drag source is my application. If I want to do the same when dragging files from explorer, for example, I can not subscribe to that event because I only have access to the drop target and not to the drag source.
Is there any other way to disable the built in cursors and copy and link signs so I can render my own in that case?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
嗯...这可能根本没有帮助(我希望它能以某种方式起作用),但是在 Visual Basic 中,使用 .NET Framework 中的语言,在创建表单时,有一个选项可以通过拖放来禁用它,所以无论如何您使用的编译器,其中可能有某种选项。
我会专门查看您正在使用的内容并阅读拖放操作,因此可能与表单/GUI 有关。
我希望这能在某种程度上有所帮助,如果没有,我深表歉意。
Hmm... this probably wont help at all (i hope it does somehow) but in visual basic, using a language in the .NET Framework, when creating a form, there is an option for drag and drop to disable it, so whatever compiler your using, there maybe some sort of option in there.
I would look specifically at what you are working with and read up on the drag and dropping, so maybe something to do with a form/GUI.
I hope this has helped in some way, if not, i apologize and gl.