开发者

Can I know in an instant whether there is a component is dragging over a control or not

Can I know in an instant whether there is a component is dragging over a control or not?.

I know that I can catch it via DeagEnter and DragLeave events, but I want a flag in an instant to give me this information.

If there isn't then, I'll create my own flag, but the problem is that I'm afraid that this value isn't true always for so开发者_Python百科me reason like moving the mouse quickly or an exception and a wrong value keeps in the control.

Any idea?


No, there are no guarantees that passing the cursor quickly over an window will trigger any of the window's events. The mouse position is reported periodically, not for every pixel it traverses.

This is not normally much of a problem. But it can byte when you rely on the MouseEnter and MouseLeave event for example with a control that is close to the edge of its container. It is a non-issue with drag+drop, the user will easily see that the mouse cursor shape isn't changing and correct for that. The visual feedback is sufficient.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜