如何检查我的mouse cursor enters any component in a panel
.
我盯着写这段代码来检查鼠标何时进入我的任何复选框panel
然后我意识到我不知道如何实际检查鼠标是否进入面板中的组件。
Private Sub GenCheck()
For Each CheckBox In datapanel1.Controls
Next
End Sub
我该怎么做呢?
编辑
我有一个想法,但我不太确定
我可以说
Private Sub GenCheck()
Dim cb As CheckBox
For Each cb In datapanel1.Controls
AddHandler cb.MouseEnter, AddressOf cb_MouseEnter
AddHandler cb.MouseLeave, AddressOf cb_MouseLeave
Next
End Sub
Private Sub cb_MouseEnter(sender As Object, e As EventArgs)
End Sub
Private Sub cb_MouseLeave(sender As Object, e As EventArgs)
End Sub