检查拖放和拖放是否正在进行 [英] Check if a drag&drop is in progress
问题描述
我有一个类似的问题,我回答了自己(经过几个小时搞砸了),见 - 如何判断一个拖放在Winforms中已经结束?。
基本上如果你做为earwicker建议当DoDragDrop调用附近的拖动开始时,您需要设置标志。如果QueryContinueDragEventArgs指示删除或取消,则需要在DragDrop事件和QueryContinueDrag中取消设置标志。
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.
I had a similar question which I answered myself (after some hours messing about) See - How do I tell if a Drag Drop has ended in Winforms?.
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屋!