我有2個面板(Panel1
和Panel2
)與Panel2
放置Panel1
鼠標離開事件有了兩個面板
我的代碼裏面:
Private Sub Panel1_MouseLeave(sender As Object, e As EventArgs) Handles Panel1.MouseLeave
MsgBox("Leave")
End Sub
的MsgBox
彈出,當我的鼠標走了進去Panel2
。
這不合邏輯,因爲我的鼠標仍然包含在Panel1
的區域。
出於事件目的,Panel2
與Panel1
應該如何被視爲相同的區域?
或這個爲此事http://stackoverflow.com/questions/1161280/parent-control-mouse-enter-leave-events-with-child-controls 雖然,答案中的代碼'缺乏工作部分。 – Gman 2013-03-12 19:25:26