C#拖放不会在Windows 7上正常工作会在、拖放、正常、工作

2023-09-02 01:25:08 作者:舊

我有相当长的使用,而C#的WinForms项目。我实现了窗口前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它工作的所有道路。该程序运行与administritave特权时。

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 VS 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

推荐答案

源和目标进程需要有兼容的安全级别特权。例如,如果你的来源是资源管理器,它与用户级权限运行,但你的目标应用是具有管理员(高架)级权限运行,您将无法拖动和放大器;下降,因为这被看作是一个安全问题,因为目标运行用的权限的更高的水平。

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.

 
精彩推荐
图片推荐