Windows 7中,用Visual Studio开发WPF应用程序,实现从Windows Explorer中拖拽文件到应用程序,始终显示“无法拖放”符号问题解决方案...

Are you running your application or Visual Studio that hosts the app under administrative privilege?

If that's the case, the Windows prevents the drag drop operation from happening. In Windows 7 or Vista, an application with a lower security privilege (your Windows Explorer with normal user privilege) cannot send data to another one (your app or Visual Studio with administrative privilege) with a higher security privilege.

Try to do one of the followings:

Run your Visual Studio without administrative privilege. Run your application outside Visual Studio without administrative privilege. Enable and long on to the Administrator account in the OS. In this case, both your Windows Explorer and your Visual Studio will have administrative privileges.

 

Be aware of windows vista/windows 7 security rights - if you are running Visual Studio as administrator, you will not be able to drag files from a non-administrator explorer window into your program when you run it from within visual studio. The drag related events will not even fire! I hope this helps somebody else out there not waste hours of their life...

 

这是因为Windows 7的安全权限限制,导致无法激发拖拽和拖放事件,解决方案为使用Administrator用户登录,或者将Visual Studio的启动权限设置为非管理员。

转载于:https://www.cnblogs.com/dadream/p/4800696.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值