检查是否拖放放大器;降正在进行中 [英] Check if a drag&drop is in progress

查看:115
本文介绍了检查是否拖放放大器;降正在进行中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有什么办法来检查,如果拖放过程中?可查了一些方法或Win32 API的?我知道我可以设置的AllowDrop并使用事件,但它并没有在这种情况下工作。基本上,我想检查,使用代码,如果任何拖放放大器;下降过程中。

Is there any way to check if a drag and drop is in progress? Some method or win32 api which can be checked? I know I can set AllowDrop and use events but it doesn't work in this case. Basically i want to check, with code, if any drag&drop is in progress.

推荐答案

我有一个类似的问题,我回答我自己(几个小时后搞乱)查看 - 的 http://stackoverflow.com/questions/480156/how-do-i-tell-if-a-drag-drop-has-ended-in-winforms

I had a similar question which I answered myself (after some hours messing about) See - http://stackoverflow.com/questions/480156/how-do-i-tell-if-a-drag-drop-has-ended-in-winforms.

基本上,如果你做的埃里克建议你需要的时候拖放开始的DoDragDrop调用附近设置标志。您需要取消设置标志,同时在DragDrop事件,并在QueryContinueDrag如果QueryContinueDragEventArgs表明降或取消。

Basically if you do as earwicker suggests you need to set the flag when the drag drop begins near the DoDragDrop call. You will need to unset the flag in both the DragDrop event and in the QueryContinueDrag if the QueryContinueDragEventArgs indicate a drop or a cancel.

这篇关于检查是否拖放放大器;降正在进行中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆