0

在我的 VB.Net 表单应用程序中,我有一个功能:

Private Sub pnlMain_MouseLeave(sender As Object, e As System.EventArgs) Handles pnlMain.MouseLeave
...
End Sub

和另一个功能:

Private Sub pnlMain_MouseEnter(sender As Object, e As System.EventArgs) Handles pnlMain.MouseEnter
...
End Sub

当鼠标进入或离开时,两者都被执行 - 首先进入然后离开。为什么会这样?

4

1 回答 1

1

它没有或不应该

但是如果你在 enter 事件上有一个断点,那么它会在你点击它时触发 mouseleave 事件。(因为你已经触发了离开事件)。

于 2012-06-19T08:00:44.747 回答