简体   繁体   English

为什么我的DragDrop处理程序不会触发?

[英]Why won't my DragDrop handlers fire?

Created a WinForm app, set AllowDrop property on the form to true, wired up the drag handlers (enter, exit, over and drop) and they weren't firing. 创建了一个WinForm应用程序,将窗体上的AllowDrop属性设置为true,连接了拖动处理程序(输入,退出,覆盖和放下),并且它们均未触发。 Why not? 为什么不?

I always launch visual studio from a shortcut that runs it as Administrator (because I often do socket stuff that requires admin rights). 我总是从以管理员身份运行它的快捷方式启动Visual Studio(因为我经常做需要管理员权限的套接字操作)。 But my windows explorer shell is not executing as admin, so it disallows the drop due to permissions. 但是我的Windows资源管理器外壳程序未以admin身份执行,因此由于权限的原因,它不允许删除。

Relaunching VS without admin permissions fixes the problem. 在没有管理员权限的情况下重新启动VS可解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM