C# Drag drop does not work on windows 7(C# 拖放在 Windows 7 上不起作用)
问题描述
我有一个项目使用 C# winforms 已经有一段时间了.我在 Windows 7 发布之前实现了拖放功能.像魅力一样工作.但是,当使用 Windows 7 时,它不起作用.该事件甚至没有被触发.
I have had a project for quite a while using C# winforms. I implemented a drag-drop function before windows 7 was released. Worked like a charm. However, when using windows 7 it does not work. The event doesn't even get triggered.
AllowDrop
设置为 true.订阅 DragEnter
时,它不会在 Windows 7 中调用(不确定 vista).但在 XP 上它一直有效.该程序以管理员权限运行.
AllowDrop
is set to true. When subscribing to DragEnter
it does not get called in windows 7 (not sure about vista). But on XP it works all the way. The program is run with administritave priviliges.
windows 7 和 xp 中的拖放有什么不同吗?不知道是否相关,但我使用的是 x64
Is there any difference in the drag drop in windows 7 vs xp? Don't know if it's relevant, but I'm using x64
推荐答案
源进程和目标进程需要具有兼容的安全级别/权限.例如,如果您的源是 Explorer 并且它以用户级别权限运行,但您的目标应用程序以管理员(提升)级别权限运行,您将无法拖放,因为这被视为安全问题,因为目标正在以更高级别的权限运行.
The source and target processes need to have compatible security levels/privileges. For example, if your source is Explorer and it is running with user level privileges, but your target application is running with administrator (elevated) level permission, you will not be able to drag&drop as this is seen as a security issue as the target is running with a higher level of privileges.
这篇关于C# 拖放在 Windows 7 上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:C# 拖放在 Windows 7 上不起作用
基础教程推荐
- 将 XML 转换为通用列表 2022-01-01
- rabbitmq 的 REST API 2022-01-01
- 如何激活MC67中的红灯 2022-01-01
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- SSE 浮点算术是否可重现? 2022-01-01
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- MS Visual Studio .NET 的替代品 2022-01-01
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01
- c# Math.Sqrt 实现 2022-01-01